@neofaceid/web-sdk 1.42.0 → 1.42.2

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/dist/index.d.ts CHANGED
@@ -1595,7 +1595,7 @@ export declare const registerPersonWithoutFace: (personData: {
1595
1595
  /**
1596
1596
  * Data de lançamento da versão atual
1597
1597
  */
1598
- export declare const RELEASE_DATE = "2026-09-10";
1598
+ export declare const RELEASE_DATE = "2026-09-14";
1599
1599
 
1600
1600
  declare interface RequestChallengeWithSessionParams {
1601
1601
  applicationToken: string;
@@ -2032,7 +2032,7 @@ export declare const validateToken: (applicationToken: string) => Promise<boolea
2032
2032
  * MINOR: Incrementado quando adicionamos funcionalidades mantendo compatibilidade
2033
2033
  * PATCH: Incrementado quando corrigimos bugs mantendo compatibilidade
2034
2034
  */
2035
- export declare const VERSION = "1.42.0";
2035
+ export declare const VERSION = "1.42.2";
2036
2036
 
2037
2037
  /**
2038
2038
  * Executa `fn(sessionId)`. Se o servidor devolver 410 (sessão consumida/expirada),
@@ -8867,8 +8867,8 @@ function BiometricRegistrationModal({
8867
8867
  /* @__PURE__ */ jsx("canvas", { ref: canvasRef })
8868
8868
  ] });
8869
8869
  }
8870
- const VERSION = "1.42.0";
8871
- const RELEASE_DATE = "2026-09-10";
8870
+ const VERSION = "1.42.2";
8871
+ const RELEASE_DATE = "2026-09-14";
8872
8872
  const CONSENT_TRAIL_STORAGE_KEY = "neoface_consent_trail_v1";
8873
8873
  const CONSENT_TRAIL_MAX_LIMIT = 100;
8874
8874
  async function hashString(inputStr) {
@@ -8945,8 +8945,6 @@ const COPY = {
8945
8945
  bullet1Body: "Você vê a imagem o tempo todo e pode encerrar quando quiser.",
8946
8946
  bullet2Title: "Pediremos dois movimentos simples",
8947
8947
  bullet2Body: "Virar o rosto ou piscar — é assim que sabemos que há alguém ali.",
8948
- bullet3Title: "A imagem não fica guardada",
8949
- bullet3Body: "Ela é usada para a verificação e descartada em seguida.",
8950
8948
  primary: "Começar verificação"
8951
8949
  },
8952
8950
  registration: {
@@ -8956,11 +8954,26 @@ const COPY = {
8956
8954
  bullet1Body: "Você vê a imagem o tempo todo e pode encerrar quando quiser.",
8957
8955
  bullet2Title: "Pediremos dois movimentos simples",
8958
8956
  bullet2Body: "Virar o rosto ou piscar — é assim que sabemos que há alguém ali.",
8959
- bullet3Title: "Guardamos um vetor matemático do seu rosto",
8960
- bullet3Body: "Não a foto. A imagem é descartada.",
8961
8957
  primary: "Começar cadastro"
8962
8958
  }
8963
8959
  };
8960
+ const plural = (n) => n === 1 ? "dia" : "dias";
8961
+ function terceiroMarcador(flow, retentionDays) {
8962
+ const prazoDeclarado = Number.isFinite(retentionDays) && retentionDays > 0;
8963
+ if (flow === "registration") {
8964
+ return {
8965
+ title: "Guardamos um vetor matemático do seu rosto",
8966
+ body: prazoDeclarado ? `Não a foto. A imagem fica guardada por até ${retentionDays} ${plural(retentionDays)} e é apagada no fim desse prazo.` : "Não a foto. O prazo de guarda da imagem está na política de privacidade."
8967
+ };
8968
+ }
8969
+ return prazoDeclarado ? {
8970
+ title: `A imagem fica guardada por até ${retentionDays} ${plural(retentionDays)}`,
8971
+ body: "Ela é usada para a verificação e apagada no fim desse prazo."
8972
+ } : {
8973
+ title: "A imagem é tratada conforme a política de privacidade",
8974
+ body: "Ela é usada para a verificação; o prazo de guarda está descrito lá."
8975
+ };
8976
+ }
8964
8977
  const IconCamera = () => /* @__PURE__ */ jsxs(
8965
8978
  "svg",
8966
8979
  {
@@ -9025,6 +9038,8 @@ function ConsentModalComponent({
9025
9038
  onDecline
9026
9039
  }) {
9027
9040
  const copy = COPY[flow];
9041
+ const marcador3 = terceiroMarcador(flow, retentionDays);
9042
+ const prazoDeclarado = Number.isFinite(retentionDays) && retentionDays > 0;
9028
9043
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9029
9044
  /* @__PURE__ */ jsx("style", { children: `
9030
9045
  @keyframes neofaceidConsentFadeIn { from { opacity: 0 } to { opacity: 1 } }
@@ -9201,23 +9216,19 @@ function ConsentModalComponent({
9201
9216
  /* @__PURE__ */ jsxs("div", { className: "neofaceid-consent-bullet", children: [
9202
9217
  /* @__PURE__ */ jsx("div", { className: "neofaceid-consent-bullet-icon", children: /* @__PURE__ */ jsx(IconShield, {}) }),
9203
9218
  /* @__PURE__ */ jsxs("div", { children: [
9204
- /* @__PURE__ */ jsx("p", { className: "neofaceid-consent-bullet-title", children: copy.bullet3Title }),
9205
- /* @__PURE__ */ jsx("p", { className: "neofaceid-consent-bullet-body", children: copy.bullet3Body })
9219
+ /* @__PURE__ */ jsx("p", { className: "neofaceid-consent-bullet-title", children: marcador3.title }),
9220
+ /* @__PURE__ */ jsx("p", { className: "neofaceid-consent-bullet-body", children: marcador3.body })
9206
9221
  ] })
9207
9222
  ] })
9208
9223
  ] }),
9209
- /* @__PURE__ */ jsxs(
9224
+ /* @__PURE__ */ jsx(
9210
9225
  "a",
9211
9226
  {
9212
9227
  href: privacyPolicyUrl,
9213
9228
  target: "_blank",
9214
9229
  rel: "noopener noreferrer",
9215
9230
  className: "neofaceid-consent-link",
9216
- children: [
9217
- "Ver política de privacidade (retenção de até ",
9218
- retentionDays,
9219
- " dias)"
9220
- ]
9231
+ children: prazoDeclarado ? `Ver política de privacidade (retenção de até ${retentionDays} ${plural(retentionDays)})` : "Ver política de privacidade"
9221
9232
  }
9222
9233
  ),
9223
9234
  /* @__PURE__ */ jsxs("div", { className: "neofaceid-consent-actions", children: [
@@ -11844,7 +11855,7 @@ async function detectFaceWithPosition(video, stream, guideModal, maxTime = FACE_
11844
11855
  checkFace();
11845
11856
  });
11846
11857
  }
11847
- async function attemptLogin(applicationToken, fastMode = false, isRetry = false, onCancel) {
11858
+ async function attemptLogin(applicationToken, fastMode = false, onCancel) {
11848
11859
  const guideModal = showCameraOvalGuideModal({
11849
11860
  stream: null,
11850
11861
  faceState: "searching",
@@ -12013,7 +12024,7 @@ async function executeBiometricLoginFlow(options) {
12013
12024
  const tryLogin = async () => {
12014
12025
  try {
12015
12026
  attempts++;
12016
- const result = await attemptLogin(applicationToken, fastMode, attempts > 1, onCancel);
12027
+ const result = await attemptLogin(applicationToken, fastMode, onCancel);
12017
12028
  onSuccess(result);
12018
12029
  } catch (error) {
12019
12030
  lastError = error instanceof NeoFaceError ? error : new NeoFaceError(