idmission-web-sdk 0.0.13 → 0.0.15

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/sdk2.esm.js CHANGED
@@ -192,7 +192,7 @@ var templateObject_1$4;
192
192
  var OverlayContainer = styled(PageContainer)(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n background: white;\n z-index: 10000;\n"], ["\n background: white;\n z-index: 10000;\n"])));
193
193
  var OverlayInner = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"], ["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"])));
194
194
  var OverlayImageWrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
195
- var OverlayImageMultiContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n }\n }\n"])));
195
+ var OverlayImageMultiContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
196
196
  var templateObject_1$3, templateObject_2, templateObject_3, templateObject_4;
197
197
 
198
198
  var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
@@ -2752,8 +2752,14 @@ var reducer$3 = function reducer(state, action) {
2752
2752
  faceNotCentered = Math.abs(vCX - fCX) > vTX || Math.abs(vCY + 50 - fCY) > vTY;
2753
2753
  faceLookingAway = Math.abs(fCX - nose.x) > fTW || Math.abs(fCY - nose.y) > fTH;
2754
2754
  }
2755
- var tooCloseMultiple = isMobile() ? 2 : 4.5;
2756
- var tooFarMultiple = isMobile() ? 6 : 7;
2755
+ var isMobile = state.videoWidth < state.videoHeight;
2756
+ var tooCloseMultiple = isMobile ? 2 : 4.5;
2757
+ var tooFarMultiple = isMobile ? 6 : 7;
2758
+ console.log({
2759
+ faceBoxWidth: face.box.width,
2760
+ videoWidth: state.videoWidth,
2761
+ tooCloseMultiple: tooCloseMultiple
2762
+ });
2757
2763
  faceTooClose = face.box.width > state.videoWidth / tooCloseMultiple;
2758
2764
  faceTooFar = face.box.width < state.videoWidth / tooFarMultiple;
2759
2765
  }