@idscan/onboarding 2.2.7 → 2.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/onboarding",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "Wrapper of the IDVC library for DVS Online.",
5
5
  "main": "dist/js/wrapper.js",
6
6
  "types": "dist/@types/src/Wrapper.d.ts",
@@ -20,7 +20,7 @@
20
20
  "minor": "npm version minor"
21
21
  },
22
22
  "dependencies": {
23
- "@idscan/idvc2": "^2.5.1",
23
+ "@idscan/idvc2": "^2.5.6",
24
24
  "core-js": "^3.30.0",
25
25
  "qrcode": "^1.5.1",
26
26
  "regenerator-runtime": "^0.13.11"
package/readme.md CHANGED
@@ -148,6 +148,9 @@ btn.addEventListener('click', () => {
148
148
  **updateConfig** (string) - the method that reinitialize wrapper with new config. Parameter is an JSON encoded IDVC config. Works only in demo mode.
149
149
 
150
150
  ## Version history
151
+ - **2.2.8**
152
+ - Updated IDVC component
153
+
151
154
  - **2.2.7**
152
155
  - Update TS types
153
156
 
@@ -1 +0,0 @@
1
- var __webpack_exports__={},generateFaceColorFromAngle=function(t){var n=Math.abs(Math.trunc(255-t));return n>200&&(n=200),n<50&&(n=50),"rgba(255,215,".concat(n.toString(),",0.3)")},binarize=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,o=t.width*t.height,r=new Uint8ClampedArray(o);for(n=0;n<o;n+=1){var i=n<<2;77*t.data[i+0]+151*t.data[i+1]+28*t.data[i+2]>>8<e&&(r[n]=1)}return r},topPoint=function(t,n){return t-n},bottomPoint=function(t,n){return t+n},leftPoint=function(t,n){return t%n>1?t-1:-1},rightPoint=function(t,n){return(t+1)%n>=0?t+1:-1},topLeftPoint=function(t,n){return leftPoint(topPoint(t,n),n)},topRightPoint=function(t,n){return rightPoint(topPoint(t,n),n)},bottomLeftPoint=function(t,n){return leftPoint(bottomPoint(t,n),n)},bottomRightPoint=function(t,n){return rightPoint(bottomPoint(t,n),n)},getNeigbors=function(t,n){return[topLeftPoint,topPoint,topRightPoint,rightPoint,bottomRightPoint,bottomPoint,bottomLeftPoint,leftPoint].map((function(e){return e(t,n)}))},segmentize2=function(t,n){var e,o=[],r=[],i=t.length,u=0,a=function(){for(var e=function(n){return n>0&&0!==t[n]&&n<i};o.length;){var a=o.pop();if(!a)break;t[a]=0,r[u].add(a),getNeigbors(a,n).forEach((function(t){e(t)&&o.push(t)}))}};for(e=0;e<i;e+=1)0!==t[e]&&(r[u]=new Set,o.push(e),a(),u+=1);return r},getResizedSizes=function(t,n){var e=n.baseWidth,o=n.baseHeight,r=t,i=t;return e>o&&(i=(r=t)*o/e),o>e&&(r=(i=t)*e/o),{width:Math.trunc(r),height:Math.trunc(i)}},getCrop=function(t,n){var e=t.width/t.height,o=n.width/n.height,r={x:0,y:0,width:n.width,height:n.height};return e>o?(r.height=~~(n.width/e),r.y=(n.height-r.height)/2):(r.width=~~(r.height*e),r.x=(n.width-r.width)/2),r},POINT_FILL_STYLE="rgba(255, 255, 255, 0.5)",POINT_STROKE_STYLE="rgba(255, 255, 255, 0)",SCALE_FACTOR=.3,getColumn=function(t,n){return t%n},getRow=function(t,n){return Math.floor(t/n)},createCoordFromPointIdx=function(t,n){return[getColumn(t,n),getRow(t,n)]},notNull=function(t){return null!=t},coordinateSegment=function(t){var n=t.segments,e=t.width,o=t.scaleWidth,r=t.scaleHeight;return n.map((function(t){var n=Number.MAX_VALUE,i=Number.MAX_VALUE,u=Number.MIN_VALUE,a=Number.MIN_VALUE;t.forEach((function(t){var o=createCoordFromPointIdx(t,e);o[0]<n&&(n=o[0]),o[1]<i&&(i=o[1]),o[0]>u&&(u=o[0]),o[1]>a&&(a=o[1])}));var h=(u-n)*(a-i);return h>5&&h<500?{perimeter:h,x1:Math.trunc(n/SCALE_FACTOR/o),y1:Math.trunc(i/SCALE_FACTOR/r),x2:Math.trunc(u/SCALE_FACTOR/o),y2:Math.trunc(a/SCALE_FACTOR/r)}:null})).filter(notNull)},pointsProcess=function(t,n,e){var o=binarize(t);return coordinateSegment({segments:segmentize2(o,t.width),width:t.width,scaleWidth:n,scaleHeight:e})};onmessage=function(t){var n=t.data,e=pointsProcess(n.iData,n.resizedToBorderScaleWidth,n.resizedToBorderScaleHeight);postMessage({segments:e})};