@sekyro/react-native 0.1.0-rc.7 → 0.1.0-rc.9

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,17 @@
1
1
  # @sekyro/react-native
2
2
 
3
+ ## 0.1.0-rc.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 244e4e1: Status colours are standard. `theme.colors.danger`, `success` and `warning` are deprecated and ignored (one warning in development builds); they are no longer passed to the native SDKs and will be removed in 1.0.
8
+
9
+ ## 0.1.0-rc.8
10
+
11
+ ### Patch Changes
12
+
13
+ - a23b2fb: Pins the native SDKs 0.1.0-rc.8 (Android `ai.sekyro:sekyro-bom`, iOS `sekyro-ios-dist`): verification copy without long dashes in every language, and the new `insufficient_balance` reason (a prepaid organization's balance cannot pay for a step, such as a phone code) says the method is not available right now and offers another way when the flow has one.
14
+
3
15
  ## 0.1.0-rc.7
4
16
 
5
17
  ### Patch Changes
@@ -39,8 +39,8 @@ internal object ConfigMapper {
39
39
  "light" -> SekyroTheme.DarkMode.LIGHT; "dark" -> SekyroTheme.DarkMode.DARK; else -> SekyroTheme.DarkMode.SYSTEM
40
40
  },
41
41
  bg = color(colors, "bg"), surface = color(colors, "surface"), fg = color(colors, "fg"),
42
- fgMuted = color(colors, "fgMuted"), danger = color(colors, "danger"),
43
- success = color(colors, "success"), warning = color(colors, "warning"),
42
+ fgMuted = color(colors, "fgMuted"),
43
+ // danger / success / warning are not read: status colours are standard (deprecated no-ops, removed in 1.0).
44
44
  border = color(colors, "border"), fontFamily = fontFamily,
45
45
  )
46
46
  val strings = if (m.hasKey("strings") && !m.isNull("strings")) {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var C=(e,r)=>{for(var t in r)u(e,t,{get:r[t],enumerable:!0})},O=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of w(r))!h.call(e,i)&&i!==t&&u(e,i,{get:()=>r[i],enumerable:!(n=N(r,i))||n.enumerable});return e};var x=e=>O(u({},"__esModule",{value:!0}),e);var j={};C(j,{SDK_VERSION:()=>R,SekyroError:()=>l,SekyroFlow:()=>E,nativeVersion:()=>_,startSekyro:()=>y});module.exports=x(j);var S=require("react-native"),d=S.TurboModuleRegistry.get("SekyroReactNative");var l=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var b=500,T=new Set(["ar","fr","en","es","pt","de"]),I=["brand","brandFg","bg","surface","fg","fgMuted","border","danger","success","warning"],F=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),D=/^#[0-9a-fA-F]{6}$/,V=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,a=e=>{throw new l("invalid_config",`invalid config: ${e}`)};function k(e){(typeof e!="object"||e===null)&&a("config");for(let n of Object.keys(e))F.has(n)||a(`unknown key "${n.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&a("clientToken");let r={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&V.test(e.apiOrigin))||a("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(T.has(e.locale)||a("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let n={};for(let[i,s]of Object.entries(t.colors))s!==void 0&&((!I.includes(i)||typeof s!="string"||!D.test(s))&&a(`theme.colors.${i.slice(0,32)}`),n[i]=s);r.colors=n}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&a("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&a("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||a("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||a("strings need locale");let n=e.strings[e.locale]??{},i={},s=Object.entries(n).filter(([,o])=>o!==void 0);s.length>b&&a("strings (too many overrides)");for(let[o,f]of s)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||a("strings key"),(typeof f!="string"||f.length>2e3)&&a(`strings.${o}`),i[o]=f;r.strings=i}return r}var M=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function g(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!M.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var $=new Set(["approved","review_pending","rejected","expired"]);function m(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&$.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus}:{status:"failed",code:"unknown_error"}}function v(){if(!d)throw new l("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return d}var c=!1,A=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function y(e){let r=k(e),t=v();if(c)throw new l("flow_in_progress");c=!0;let n=e.onEvent,i=n?t.onEvent(s=>{let o=g(s);o&&n(o)}):void 0;try{return m(await t.start(r))}catch(s){let o=s?.code;if(typeof o=="string"&&A.has(o))throw new l(o);return{status:"failed",code:"unknown_error"}}finally{i?.remove(),c=!1}}function _(){return v().nativeVersion()}var p=require("react");function E(e){let r=(0,p.useRef)(null),t=(0,p.useRef)(e);return t.current=e,(0,p.useEffect)(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:n,onEvent:i,...s}=t.current;y({...s,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof l?o.code:"unknown_error"}))},[e.clientToken]),null}var R="0.1.0-rc.7";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
1
+ "use strict";var f=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var O=(e,r)=>{for(var t in r)f(e,t,{get:r[t],enumerable:!0})},x=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of h(r))!C.call(e,n)&&n!==t&&f(e,n,{get:()=>r[n],enumerable:!(i=w(r,n))||i.enumerable});return e};var b=e=>x(f({},"__esModule",{value:!0}),e);var L={};O(L,{SDK_VERSION:()=>N,SekyroError:()=>l,SekyroFlow:()=>R,nativeVersion:()=>E,startSekyro:()=>u});module.exports=b(L);var S=require("react-native"),d=S.TurboModuleRegistry.get("SekyroReactNative");var l=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var T=500,I=new Set(["ar","fr","en","es","pt","de"]),D=["brand","brandFg","bg","surface","fg","fgMuted","border"],F=["danger","success","warning"],k=!1,V=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),M=/^#[0-9a-fA-F]{6}$/,$=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,a=e=>{throw new l("invalid_config",`invalid config: ${e}`)};function g(e){(typeof e!="object"||e===null)&&a("config");for(let i of Object.keys(e))V.has(i)||a(`unknown key "${i.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&a("clientToken");let r={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&$.test(e.apiOrigin))||a("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(I.has(e.locale)||a("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let i={};for(let[n,s]of Object.entries(t.colors))if(s!==void 0){if(F.includes(n)){__DEV__&&!k&&(k=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!D.includes(n)||typeof s!="string"||!M.test(s))&&a(`theme.colors.${n.slice(0,32)}`),i[n]=s}r.colors=i}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&a("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&a("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||a("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||a("strings need locale");let i=e.strings[e.locale]??{},n={},s=Object.entries(i).filter(([,o])=>o!==void 0);s.length>T&&a("strings (too many overrides)");for(let[o,y]of s)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||a("strings key"),(typeof y!="string"||y.length>2e3)&&a(`strings.${o}`),n[o]=y;r.strings=n}return r}var A=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function m(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!A.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var P=new Set(["approved","review_pending","rejected","expired"]);function v(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&P.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus}:{status:"failed",code:"unknown_error"}}function _(){if(!d)throw new l("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return d}var c=!1,j=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function u(e){let r=g(e),t=_();if(c)throw new l("flow_in_progress");c=!0;let i=e.onEvent,n=i?t.onEvent(s=>{let o=m(s);o&&i(o)}):void 0;try{return v(await t.start(r))}catch(s){let o=s?.code;if(typeof o=="string"&&j.has(o))throw new l(o);return{status:"failed",code:"unknown_error"}}finally{n?.remove(),c=!1}}function E(){return _().nativeVersion()}var p=require("react");function R(e){let r=(0,p.useRef)(null),t=(0,p.useRef)(e);return t.current=e,(0,p.useEffect)(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:i,onEvent:n,...s}=t.current;u({...s,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof l?o.code:"unknown_error"}))},[e.clientToken]),null}var N="0.1.0-rc.9";0&&(module.exports={SDK_VERSION,SekyroError,SekyroFlow,nativeVersion,startSekyro});
package/dist/index.d.cts CHANGED
@@ -1,11 +1,21 @@
1
1
  /** UI language of the native flow. es, pt and de carry the Human copy set and fall back to English elsewhere (spec 2026-10-29 §9). @public */
2
2
  type SekyroLocale = 'ar' | 'fr' | 'en' | 'es' | 'pt' | 'de';
3
- /** Themeable colour roles, shared by the Android and iOS cores. @public */
3
+ /**
4
+ * Themeable colour roles, shared by the Android and iOS cores. `danger`, `success` and `warning` are deprecated: status
5
+ * colours are standard since 0.1.0-rc.9, the SDK ignores them and they will be removed in 1.0. @public
6
+ */
4
7
  type SekyroColorRole = 'brand' | 'brandFg' | 'bg' | 'surface' | 'fg' | 'fgMuted' | 'border' | 'danger' | 'success' | 'warning';
5
8
  /** Runtime theme applied over the native defaults. @public */
6
9
  interface SekyroTheme {
7
10
  /** `'#RRGGBB'` per role. */
8
- colors?: Partial<Record<SekyroColorRole, string>>;
11
+ colors?: Partial<Record<Exclude<SekyroColorRole, 'danger' | 'success' | 'warning'>, string>> & {
12
+ /** @deprecated Status colours are standard since 0.1.0-rc.9; this key is ignored and will be removed in 1.0. */
13
+ danger?: string;
14
+ /** @deprecated Status colours are standard since 0.1.0-rc.9; this key is ignored and will be removed in 1.0. */
15
+ success?: string;
16
+ /** @deprecated Status colours are standard since 0.1.0-rc.9; this key is ignored and will be removed in 1.0. */
17
+ warning?: string;
18
+ };
9
19
  /** Corner radius in dp / pt, 0–32. */
10
20
  radius?: number;
11
21
  /**
@@ -74,7 +84,7 @@ type SekyroResult = {
74
84
  */
75
85
  declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
76
86
  /**
77
- * Version of the bundled native core: `'android 0.1.0-rc.7'` / `'ios 0.1.0-rc.7'`.
87
+ * Version of the bundled native core: `'android 0.1.0-rc.8'` / `'ios 0.1.0-rc.8'`.
78
88
  * @public
79
89
  */
80
90
  declare function nativeVersion(): string;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,21 @@
1
1
  /** UI language of the native flow. es, pt and de carry the Human copy set and fall back to English elsewhere (spec 2026-10-29 §9). @public */
2
2
  type SekyroLocale = 'ar' | 'fr' | 'en' | 'es' | 'pt' | 'de';
3
- /** Themeable colour roles, shared by the Android and iOS cores. @public */
3
+ /**
4
+ * Themeable colour roles, shared by the Android and iOS cores. `danger`, `success` and `warning` are deprecated: status
5
+ * colours are standard since 0.1.0-rc.9, the SDK ignores them and they will be removed in 1.0. @public
6
+ */
4
7
  type SekyroColorRole = 'brand' | 'brandFg' | 'bg' | 'surface' | 'fg' | 'fgMuted' | 'border' | 'danger' | 'success' | 'warning';
5
8
  /** Runtime theme applied over the native defaults. @public */
6
9
  interface SekyroTheme {
7
10
  /** `'#RRGGBB'` per role. */
8
- colors?: Partial<Record<SekyroColorRole, string>>;
11
+ colors?: Partial<Record<Exclude<SekyroColorRole, 'danger' | 'success' | 'warning'>, string>> & {
12
+ /** @deprecated Status colours are standard since 0.1.0-rc.9; this key is ignored and will be removed in 1.0. */
13
+ danger?: string;
14
+ /** @deprecated Status colours are standard since 0.1.0-rc.9; this key is ignored and will be removed in 1.0. */
15
+ success?: string;
16
+ /** @deprecated Status colours are standard since 0.1.0-rc.9; this key is ignored and will be removed in 1.0. */
17
+ warning?: string;
18
+ };
9
19
  /** Corner radius in dp / pt, 0–32. */
10
20
  radius?: number;
11
21
  /**
@@ -74,7 +84,7 @@ type SekyroResult = {
74
84
  */
75
85
  declare function startSekyro(config: SekyroConfig): Promise<SekyroResult>;
76
86
  /**
77
- * Version of the bundled native core: `'android 0.1.0-rc.7'` / `'ios 0.1.0-rc.7'`.
87
+ * Version of the bundled native core: `'android 0.1.0-rc.8'` / `'ios 0.1.0-rc.8'`.
78
88
  * @public
79
89
  */
80
90
  declare function nativeVersion(): string;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{TurboModuleRegistry as m}from"react-native";var y=m.get("SekyroReactNative");var a=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var v=500,_=new Set(["ar","fr","en","es","pt","de"]),E=["brand","brandFg","bg","surface","fg","fgMuted","border","danger","success","warning"],R=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),N=/^#[0-9a-fA-F]{6}$/,w=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,i=e=>{throw new a("invalid_config",`invalid config: ${e}`)};function d(e){(typeof e!="object"||e===null)&&i("config");for(let s of Object.keys(e))R.has(s)||i(`unknown key "${s.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&i("clientToken");let r={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&w.test(e.apiOrigin))||i("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(_.has(e.locale)||i("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let s={};for(let[l,n]of Object.entries(t.colors))n!==void 0&&((!E.includes(l)||typeof n!="string"||!N.test(n))&&i(`theme.colors.${l.slice(0,32)}`),s[l]=n);r.colors=s}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&i("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&i("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||i("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||i("strings need locale");let s=e.strings[e.locale]??{},l={},n=Object.entries(s).filter(([,o])=>o!==void 0);n.length>v&&i("strings (too many overrides)");for(let[o,p]of n)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||i("strings key"),(typeof p!="string"||p.length>2e3)&&i(`strings.${o}`),l[o]=p;r.strings=l}return r}var h=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function c(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!h.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var C=new Set(["approved","review_pending","rejected","expired"]);function S(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&C.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus}:{status:"failed",code:"unknown_error"}}function k(){if(!y)throw new a("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return y}var f=!1,O=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function u(e){let r=d(e),t=k();if(f)throw new a("flow_in_progress");f=!0;let s=e.onEvent,l=s?t.onEvent(n=>{let o=c(n);o&&s(o)}):void 0;try{return S(await t.start(r))}catch(n){let o=n?.code;if(typeof o=="string"&&O.has(o))throw new a(o);return{status:"failed",code:"unknown_error"}}finally{l?.remove(),f=!1}}function x(){return k().nativeVersion()}import{useEffect as b,useRef as g}from"react";function T(e){let r=g(null),t=g(e);return t.current=e,b(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:s,onEvent:l,...n}=t.current;u({...n,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof a?o.code:"unknown_error"}))},[e.clientToken]),null}var I="0.1.0-rc.7";export{I as SDK_VERSION,a as SekyroError,T as SekyroFlow,x as nativeVersion,u as startSekyro};
1
+ import{TurboModuleRegistry as v}from"react-native";var u=v.get("SekyroReactNative");var a=class extends Error{code;constructor(r,t=r){super(t),this.name="SekyroError",this.code=r}};var _=500,E=new Set(["ar","fr","en","es","pt","de"]),R=["brand","brandFg","bg","surface","fg","fgMuted","border"],N=["danger","success","warning"],d=!1,w=new Set(["clientToken","apiOrigin","locale","theme","strings","onEvent"]),h=/^#[0-9a-fA-F]{6}$/,C=/^http:\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2)(:\d+)?$/,i=e=>{throw new a("invalid_config",`invalid config: ${e}`)};function c(e){(typeof e!="object"||e===null)&&i("config");for(let s of Object.keys(e))w.has(s)||i(`unknown key "${s.slice(0,32)}"`);(typeof e.clientToken!="string"||e.clientToken.length===0)&&i("clientToken");let r={clientToken:e.clientToken};e.apiOrigin!==void 0&&(typeof e.apiOrigin=="string"&&(/^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e.apiOrigin)||__DEV__&&C.test(e.apiOrigin))||i("apiOrigin"),r.apiOrigin=e.apiOrigin),e.locale!==void 0&&(E.has(e.locale)||i("locale"),r.locale=e.locale);let t=e.theme;if(t){if(t.colors){let s={};for(let[l,n]of Object.entries(t.colors))if(n!==void 0){if(N.includes(l)){__DEV__&&!d&&(d=!0,console.warn("[sekyro] theme.colors.danger/success/warning are ignored: status colours are standard (removed in 1.0)"));continue}(!R.includes(l)||typeof n!="string"||!h.test(n))&&i(`theme.colors.${l.slice(0,32)}`),s[l]=n}r.colors=s}t.radius!==void 0&&((typeof t.radius!="number"||!Number.isFinite(t.radius)||t.radius<0||t.radius>32)&&i("theme.radius"),r.radius=t.radius),t.fontFamily!==void 0&&((typeof t.fontFamily!="string"||!/^[\w .-]{1,64}$/.test(t.fontFamily))&&i("theme.fontFamily"),r.fontFamily=t.fontFamily),t.darkMode!==void 0&&(["system","light","dark"].includes(t.darkMode)||i("theme.darkMode"),r.darkMode=t.darkMode)}if(e.strings){e.locale||i("strings need locale");let s=e.strings[e.locale]??{},l={},n=Object.entries(s).filter(([,o])=>o!==void 0);n.length>_&&i("strings (too many overrides)");for(let[o,p]of n)/^[a-zA-Z0-9_.]{1,96}$/.test(o)||i("strings key"),(typeof p!="string"||p.length>2e3)&&i(`strings.${o}`),l[o]=p;r.strings=l}return r}var O=new Set(["method","phone_otp","email_otp","registry","document","nfc","liveness","processing","result","update_required","eid","contact_choice","identity_summary","portrait"]);function S(e){if(e.type==="waiting_for_network")return{type:"waiting_for_network"};if(e.type!=="step"||!O.has(e.step))return null;let r=e.step,t=typeof e.retryReason=="string"&&/^[a-z0-9_]{1,64}$/.test(e.retryReason)?e.retryReason:void 0;return t?{type:"step",step:r,retryReason:t}:{type:"step",step:r}}var x=new Set(["approved","review_pending","rejected","expired"]);function k(e){return e.status==="cancelled"?{status:"cancelled"}:e.status==="failed"?{status:"failed",code:e.code||"unknown_error"}:e.status==="finished"&&e.sessionId&&x.has(e.displayStatus)?{status:"finished",sessionId:e.sessionId,displayStatus:e.displayStatus}:{status:"failed",code:"unknown_error"}}function g(){if(!u)throw new a("unsupported_platform","the SekyroReactNative native module is not linked (New Architecture app, pod install / Gradle sync)");return u}var y=!1,b=new Set(["no_activity","unsupported_platform","flow_in_progress","invalid_config"]);async function f(e){let r=c(e),t=g();if(y)throw new a("flow_in_progress");y=!0;let s=e.onEvent,l=s?t.onEvent(n=>{let o=S(n);o&&s(o)}):void 0;try{return k(await t.start(r))}catch(n){let o=n?.code;if(typeof o=="string"&&b.has(o))throw new a(o);return{status:"failed",code:"unknown_error"}}finally{l?.remove(),y=!1}}function T(){return g().nativeVersion()}import{useEffect as I,useRef as m}from"react";function D(e){let r=m(null),t=m(e);return t.current=e,I(()=>{if(r.current===e.clientToken)return;r.current=e.clientToken;let{onResult:s,onEvent:l,...n}=t.current;f({...n,onEvent:o=>t.current.onEvent?.(o)}).then(o=>t.current.onResult(o),o=>t.current.onResult({status:"failed",code:o instanceof a?o.code:"unknown_error"}))},[e.clientToken]),null}var F="0.1.0-rc.9";export{F as SDK_VERSION,a as SekyroError,D as SekyroFlow,T as nativeVersion,f as startSekyro};
@@ -48,7 +48,7 @@ public final class SekyroRNBridge: NSObject {
48
48
  let theme = SekyroTheme(
49
49
  brand: try color("brand"), brandFg: try color("brandFg"), background: try color("bg"), surface: try color("surface"),
50
50
  foreground: try color("fg"), foregroundMuted: try color("fgMuted"), border: try color("border"),
51
- danger: try color("danger"), success: try color("success"), warning: try color("warning"),
51
+ // danger / success / warning are not read: status colours are standard (deprecated no-ops, removed in 1.0).
52
52
  cornerRadius: radius, fontFamily: d["fontFamily"] as? String, darkMode: mode, strings: strings)
53
53
  return SekyroConfig(clientToken: token, apiOrigin: origin, locale: locale, theme: theme)
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/react-native",
3
- "version": "0.1.0-rc.7",
3
+ "version": "0.1.0-rc.9",
4
4
  "private": false,
5
5
  "description": "Sekyro AI eKYC for React Native — glue over the binary Android and iOS SDKs (New Architecture)",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -99,7 +99,7 @@
99
99
  }
100
100
  },
101
101
  "sekyro": {
102
- "android": "0.1.0-rc.7",
103
- "ios": "0.1.0-rc.7"
102
+ "android": "0.1.0-rc.8",
103
+ "ios": "0.1.0-rc.8"
104
104
  }
105
105
  }
package/sbom.cdx.json CHANGED
@@ -97,8 +97,8 @@
97
97
  "type": "application",
98
98
  "name": "react-native",
99
99
  "group": "@sekyro",
100
- "version": "0.1.0-rc.7",
101
- "bom-ref": "@sekyro/react-native@0.1.0-rc.7",
100
+ "version": "0.1.0-rc.9",
101
+ "bom-ref": "@sekyro/react-native@0.1.0-rc.9",
102
102
  "description": "Sekyro AI eKYC for React Native — glue over the binary Android and iOS SDKs (New Architecture)",
103
103
  "licenses": [
104
104
  {
@@ -108,7 +108,7 @@
108
108
  }
109
109
  }
110
110
  ],
111
- "purl": "pkg:npm/%40sekyro/react-native@0.1.0-rc.7?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23sekyro-mobile%2Freact-native",
111
+ "purl": "pkg:npm/%40sekyro/react-native@0.1.0-rc.9?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23sekyro-mobile%2Freact-native",
112
112
  "externalReferences": [
113
113
  {
114
114
  "url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
@@ -147,7 +147,7 @@
147
147
  "components": [],
148
148
  "dependencies": [
149
149
  {
150
- "ref": "@sekyro/react-native@0.1.0-rc.7"
150
+ "ref": "@sekyro/react-native@0.1.0-rc.9"
151
151
  }
152
152
  ]
153
153
  }