@neofaceid/web-sdk 1.34.0 → 1.35.0
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 +1 -1
- package/dist/neoface-id-sdk.es.js +21 -21
- package/dist/neoface-id-sdk.umd.js +1 -1
- package/package.json +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -1634,7 +1634,7 @@ export declare const validateToken: (applicationToken: string) => Promise<boolea
|
|
|
1634
1634
|
* MINOR: Incrementado quando adicionamos funcionalidades mantendo compatibilidade
|
|
1635
1635
|
* PATCH: Incrementado quando corrigimos bugs mantendo compatibilidade
|
|
1636
1636
|
*/
|
|
1637
|
-
export declare const VERSION = "1.
|
|
1637
|
+
export declare const VERSION = "1.35.0";
|
|
1638
1638
|
|
|
1639
1639
|
/**
|
|
1640
1640
|
* Executa `fn(sessionId)`. Se o servidor devolver 410 (sessão consumida/expirada),
|
|
@@ -4473,7 +4473,7 @@ const CSS_VAR = {
|
|
|
4473
4473
|
radius: "--nfid-radius"
|
|
4474
4474
|
};
|
|
4475
4475
|
const INJECTED_STYLE_ID = "neofaceid-focus-frame-tokens";
|
|
4476
|
-
function injectThemeStyles
|
|
4476
|
+
function injectThemeStyles(options = {}) {
|
|
4477
4477
|
const resolved = resolveTheme(options);
|
|
4478
4478
|
if (typeof document === "undefined") return resolved;
|
|
4479
4479
|
const css = buildRootCss(resolved);
|
|
@@ -4521,7 +4521,7 @@ function buildRootCss(theme) {
|
|
|
4521
4521
|
}
|
|
4522
4522
|
}`;
|
|
4523
4523
|
}
|
|
4524
|
-
function injectScopedStyles
|
|
4524
|
+
function injectScopedStyles(id, css) {
|
|
4525
4525
|
if (typeof document === "undefined") return;
|
|
4526
4526
|
const existing = document.getElementById(id);
|
|
4527
4527
|
if (existing) {
|
|
@@ -4612,7 +4612,7 @@ function init(options = {}) {
|
|
|
4612
4612
|
theme: globalConfig.theme
|
|
4613
4613
|
});
|
|
4614
4614
|
globalConfig.resolvedTheme = resolved;
|
|
4615
|
-
injectThemeStyles
|
|
4615
|
+
injectThemeStyles({
|
|
4616
4616
|
accent: globalConfig.accent ?? void 0,
|
|
4617
4617
|
radius: globalConfig.radius,
|
|
4618
4618
|
theme: globalConfig.theme
|
|
@@ -6410,7 +6410,7 @@ function FaceCaptureModal({
|
|
|
6410
6410
|
detectFaces();
|
|
6411
6411
|
};
|
|
6412
6412
|
useEffect(() => {
|
|
6413
|
-
injectThemeStyles
|
|
6413
|
+
injectThemeStyles();
|
|
6414
6414
|
}, []);
|
|
6415
6415
|
useEffect(() => {
|
|
6416
6416
|
const loadModels = async () => {
|
|
@@ -6564,7 +6564,7 @@ class ForgotPasswordModal {
|
|
|
6564
6564
|
}
|
|
6565
6565
|
open() {
|
|
6566
6566
|
if (this.modalElement) return;
|
|
6567
|
-
injectThemeStyles
|
|
6567
|
+
injectThemeStyles();
|
|
6568
6568
|
this.addStyles();
|
|
6569
6569
|
this.modalElement = document.createElement("div");
|
|
6570
6570
|
this.modalElement.className = "neofaceid-root neoface-forgot-modal";
|
|
@@ -6686,7 +6686,7 @@ class ForgotPasswordModal {
|
|
|
6686
6686
|
addStyles() {
|
|
6687
6687
|
const styleId = "neoface-forgot-password-modal-styles";
|
|
6688
6688
|
if (document.getElementById(styleId)) return;
|
|
6689
|
-
injectScopedStyles
|
|
6689
|
+
injectScopedStyles(styleId, `
|
|
6690
6690
|
.neoface-forgot-modal {
|
|
6691
6691
|
position: fixed;
|
|
6692
6692
|
top: 0;
|
|
@@ -7005,7 +7005,7 @@ function BiometricRegistrationModal({
|
|
|
7005
7005
|
);
|
|
7006
7006
|
const [cameraReady, setCameraReady] = useState(false);
|
|
7007
7007
|
useEffect(() => {
|
|
7008
|
-
injectThemeStyles
|
|
7008
|
+
injectThemeStyles();
|
|
7009
7009
|
}, []);
|
|
7010
7010
|
useEffect(() => {
|
|
7011
7011
|
if (state.status === "liveness") {
|
|
@@ -8712,7 +8712,7 @@ class ConsentModal {
|
|
|
8712
8712
|
}
|
|
8713
8713
|
show(props) {
|
|
8714
8714
|
if (this.container) return;
|
|
8715
|
-
injectThemeStyles
|
|
8715
|
+
injectThemeStyles();
|
|
8716
8716
|
this.container = document.createElement("div");
|
|
8717
8717
|
this.container.id = "neofaceid-consent-modal-container";
|
|
8718
8718
|
document.body.appendChild(this.container);
|
|
@@ -8846,7 +8846,7 @@ class BiometricCaptureModal {
|
|
|
8846
8846
|
</div>
|
|
8847
8847
|
</div>
|
|
8848
8848
|
`;
|
|
8849
|
-
injectThemeStyles
|
|
8849
|
+
injectThemeStyles();
|
|
8850
8850
|
this.addStyles();
|
|
8851
8851
|
this.addEventListeners();
|
|
8852
8852
|
document.body.appendChild(this.modal);
|
|
@@ -9025,7 +9025,7 @@ class BiometricCaptureModal {
|
|
|
9025
9025
|
if (existingStyles) {
|
|
9026
9026
|
existingStyles.remove();
|
|
9027
9027
|
}
|
|
9028
|
-
injectScopedStyles
|
|
9028
|
+
injectScopedStyles(styleId, `
|
|
9029
9029
|
.neofaceid-biometric-modal {
|
|
9030
9030
|
position: fixed;
|
|
9031
9031
|
top: 0;
|
|
@@ -9717,7 +9717,7 @@ class FallbackPrompt {
|
|
|
9717
9717
|
if (this.container) {
|
|
9718
9718
|
return;
|
|
9719
9719
|
}
|
|
9720
|
-
injectThemeStyles
|
|
9720
|
+
injectThemeStyles();
|
|
9721
9721
|
this.container = document.createElement("div");
|
|
9722
9722
|
this.container.id = "neofaceid-fallback-prompt";
|
|
9723
9723
|
document.body.appendChild(this.container);
|
|
@@ -9791,7 +9791,7 @@ class EmailPasswordModal {
|
|
|
9791
9791
|
}
|
|
9792
9792
|
}
|
|
9793
9793
|
createModal() {
|
|
9794
|
-
injectThemeStyles
|
|
9794
|
+
injectThemeStyles();
|
|
9795
9795
|
this.addStyles();
|
|
9796
9796
|
this.modalElement = document.createElement("div");
|
|
9797
9797
|
this.modalElement.className = "neofaceid-root neoface-email-password-modal";
|
|
@@ -9830,7 +9830,7 @@ class EmailPasswordModal {
|
|
|
9830
9830
|
if (existingStyles) {
|
|
9831
9831
|
return;
|
|
9832
9832
|
}
|
|
9833
|
-
injectScopedStyles
|
|
9833
|
+
injectScopedStyles(styleId, `
|
|
9834
9834
|
.neoface-email-password-modal {
|
|
9835
9835
|
position: fixed;
|
|
9836
9836
|
top: 0;
|
|
@@ -10866,7 +10866,7 @@ const biometricDetection = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
10866
10866
|
initializeBiometricDetection,
|
|
10867
10867
|
isAdvancedDetectionAvailable
|
|
10868
10868
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10869
|
-
const VERSION = "1.
|
|
10869
|
+
const VERSION = "1.35.0";
|
|
10870
10870
|
const RELEASE_DATE = "2026-09-02";
|
|
10871
10871
|
let cachedSession = null;
|
|
10872
10872
|
function getCachedCaptureSession() {
|
|
@@ -11839,7 +11839,7 @@ function Sheet({
|
|
|
11839
11839
|
style
|
|
11840
11840
|
}) {
|
|
11841
11841
|
useEffect(() => {
|
|
11842
|
-
injectThemeStyles
|
|
11842
|
+
injectThemeStyles();
|
|
11843
11843
|
}, []);
|
|
11844
11844
|
if (!open) return null;
|
|
11845
11845
|
const handleOverlay = () => {
|
|
@@ -12331,8 +12331,8 @@ const CSS = `
|
|
|
12331
12331
|
`;
|
|
12332
12332
|
function useStateStyles() {
|
|
12333
12333
|
useEffect(() => {
|
|
12334
|
-
injectThemeStyles
|
|
12335
|
-
injectScopedStyles
|
|
12334
|
+
injectThemeStyles();
|
|
12335
|
+
injectScopedStyles(STYLE_ID$1, CSS);
|
|
12336
12336
|
}, []);
|
|
12337
12337
|
}
|
|
12338
12338
|
function AuthorizeSuccess({ appName, onContinue }) {
|
|
@@ -12717,8 +12717,8 @@ function AuthorizeModalComponent({
|
|
|
12717
12717
|
const headerAppName = appName ?? getAppName() ?? "sua aplicação";
|
|
12718
12718
|
const headerAmount = typeof amount === "number" && Number.isFinite(amount) ? formatCurrency(amount, locale) : null;
|
|
12719
12719
|
useEffect(() => {
|
|
12720
|
-
injectThemeStyles
|
|
12721
|
-
injectScopedStyles
|
|
12720
|
+
injectThemeStyles();
|
|
12721
|
+
injectScopedStyles(
|
|
12722
12722
|
STYLE_ID,
|
|
12723
12723
|
`
|
|
12724
12724
|
.neofaceid-root .nfid-authorize-header { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
|
|
@@ -13052,8 +13052,8 @@ class DocumentCaptureModal {
|
|
|
13052
13052
|
<div class="neoface-doc-content"></div>
|
|
13053
13053
|
</div>
|
|
13054
13054
|
`;
|
|
13055
|
-
injectThemeStyles
|
|
13056
|
-
injectScopedStyles
|
|
13055
|
+
injectThemeStyles();
|
|
13056
|
+
injectScopedStyles("neoface-doc-styles-v2", this.getStyles());
|
|
13057
13057
|
overlay.classList.add("neofaceid-root");
|
|
13058
13058
|
document.body.appendChild(overlay);
|
|
13059
13059
|
this.overlay = overlay;
|