New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-plugin-canvas-picker

Package Overview
Dependencies
Maintainers
64
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-plugin-canvas-picker - npm Package Compare versions

Comparing version 1.10.21 to 1.10.22

4

dist/index.esm.js

@@ -1,2 +0,2 @@

import { __awaiter, __generator, __values, __read, __extends } from 'tslib';
import { __awaiter, __generator, __values, __read, __extends, __spreadArray } from 'tslib';
import { Point, findClosestClipPathTarget, isFillOrStrokeAffected, getOrCalculatePathTotalLength, Shape, AbstractRendererPlugin } from '@antv/g-lite';

@@ -475,3 +475,3 @@ import { vec3, mat4 } from 'gl-matrix';

function Plugin() {
var _this = _super !== null && _super.apply(this, arguments) || this;
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
_this.name = 'canvas-picker';

@@ -478,0 +478,0 @@ return _this;

@@ -477,3 +477,3 @@ 'use strict';

function Plugin() {
var _this = _super !== null && _super.apply(this, arguments) || this;
var _this = _super.apply(this, tslib.__spreadArray([], tslib.__read(arguments), false)) || this;
_this.name = 'canvas-picker';

@@ -480,0 +480,0 @@ return _this;

@@ -1,2 +0,2 @@

!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],r):r(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CanvasPicker={}),t.window.G)}(this,(function(t,r){"use strict";var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};function e(t,r,n,e){return new(n||(n=Promise))((function(i,a){function o(t){try{c(e.next(t))}catch(t){a(t)}}function u(t){try{c(e.throw(t))}catch(t){a(t)}}function c(t){var r;t.done?i(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(o,u)}c((e=e.apply(t,r||[])).next())}))}function i(t,r){var n,e,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(n=1,e&&(i=2&u[0]?e.return:u[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,u[1])).done)return i;switch(e=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,e=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&i[3]>u[1])){o.label=u[1];break}if(6===u[0]&&i[1]>o.label){o.label=i[1],i=u;break}if(i&&i[2]>o.label){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(t,o)}catch(t){u=[6,t],e=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function a(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,i,a=n.call(t),o=[];try{for(;(void 0===r||r-- >0)&&!(e=a.next()).done;)o.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function o(t,r,n){if(n||2===arguments.length)for(var e,i=0,a=r.length;a>i;i++)!e&&i in r||(e||(e=Array.prototype.slice.call(r,0,i)),e[i]=r[i]);return t.concat(e||Array.prototype.slice.call(r))}var u="undefined"!=typeof Float32Array?Float32Array:Array;function c(){var t=new u(3);return u!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function f(t,r,n,e){return t[0]=r,t[1]=n,t[2]=e,t}Math.hypot||(Math.hypot=function(){for(var t=0,r=arguments.length;r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)}),c(),function(){var t,r=(t=new u(2),u!=Float32Array&&(t[0]=0,t[1]=0),t)}();var l,s=c(),h=c(),p=c(),v=(l=new u(16),u!=Float32Array&&(l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[11]=0,l[12]=0,l[13]=0,l[14]=0),l[0]=1,l[5]=1,l[10]=1,l[15]=1,l),d=function(){function t(){var t=this;this.isHit=function(n,e,i,a){var o=t.context.pointInPathPickerFactory[n.nodeName];if(o){var u=function(t,r){var n=r[0],e=r[1],i=r[2],a=r[3],o=r[4],u=r[5],c=r[6],f=r[7],l=r[8],s=r[9],h=r[10],p=r[11],v=r[12],d=r[13],y=r[14],x=r[15],g=n*u-e*o,M=n*c-i*o,P=n*f-a*o,m=e*c-i*u,b=e*f-a*u,S=i*f-a*c,k=l*d-s*v,w=l*y-h*v,F=l*x-p*v,C=s*y-h*d,A=s*x-p*d,I=h*x-p*y,E=g*I-M*A+P*C+m*F-b*w+S*k;return E?(t[0]=(u*I-c*A+f*C)*(E=1/E),t[1]=(i*A-e*I-a*C)*E,t[2]=(d*S-y*b+x*m)*E,t[3]=(h*b-s*S-p*m)*E,t[4]=(c*F-o*I-f*w)*E,t[5]=(n*I-i*F+a*w)*E,t[6]=(y*P-v*S-x*M)*E,t[7]=(l*S-h*P+p*M)*E,t[8]=(o*A-u*F+f*k)*E,t[9]=(e*F-n*A-a*k)*E,t[10]=(v*b-d*P+x*g)*E,t[11]=(s*P-l*b-p*g)*E,t[12]=(u*w-o*C-c*k)*E,t[13]=(n*C-e*w+i*k)*E,t[14]=(d*M-v*m-y*g)*E,t[15]=(l*m-s*M+h*g)*E,t):null}(v,i),c=function(t,r,n){var e=r[0],i=r[1],a=r[2],o=n[3]*e+n[7]*i+n[11]*a+n[15];return t[0]=(n[0]*e+n[4]*i+n[8]*a+n[12])/(o=o||1),t[1]=(n[1]*e+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*e+n[6]*i+n[10]*a+n[14])/o,t}(h,f(p,e[0],e[1],0),u),l=n.getGeometryBounds().halfExtents,s=n.parsedStyle.anchor;if(c[0]+=(s&&s[0]||0)*l[0]*2,c[1]+=(s&&s[1]||0)*l[1]*2,o(n,new r.Point(c[0],c[1]),a,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(r,n){var e=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[r.nodeName];return i&&(e.beginPath(),i(e,r.parsedStyle),e.closePath()),e.isPointInPath(n.x,n.y)}}return t.prototype.apply=function(r,n){var a,o=this,u=r.renderingService,c=r.renderingContext;this.context=r,this.runtime=n;var f=null===(a=c.root)||void 0===a?void 0:a.ownerDocument;u.hooks.pick.tapPromise(t.tag,(function(t){return e(o,void 0,void 0,(function(){return i(this,(function(r){return[2,this.pick(f,t)]}))}))})),u.hooks.pickSync.tap(t.tag,(function(t){return o.pick(f,t)}))},t.prototype.pick=function(t,n){var e,i,a=n.topmost,o=n.position,u=f(s,o.x,o.y,0),c=t.elementsFromBBox(u[0],u[1],u[0],u[1]),l=[];try{for(var h=function(t){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&t[r],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),p=h.next();!p.done;p=h.next()){var v=p.value,d=v.getWorldTransform();if(this.isHit(v,u,d,!1)){var y=r.findClosestClipPathTarget(v);if(y){var x=y.parsedStyle.clipPath;if(this.isHit(x,u,x.getWorldTransform(),!0)){if(a)return n.picked=[v],n;l.push(v)}}else{if(a)return n.picked=[v],n;l.push(v)}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(e)throw e.error}}return n.picked=l,n},t.tag="CanvasPicker",t}();function y(t,r,n){return{x:t*Math.cos(n)-r*Math.sin(n),y:t*Math.sin(n)+r*Math.cos(n)}}function x(t,r,n,e,i,a,o,u,c,f){var l,s,h,p,v,d=t,g=r,M=n,P=e,m=u,b=c,S=120*Math.PI/180,k=Math.PI/180*(+i||0),w=[];if(f)s=f[0],h=f[1],p=f[2],v=f[3];else{g=(l=y(d,g,-k)).y;var F=((d=l.x)-(m=(l=y(m,b,-k)).x))/2,C=(g-(b=l.y))/2,A=F*F/(M*M)+C*C/(P*P);A>1&&(M*=A=Math.sqrt(A),P*=A);var I=M*M,E=P*P,O=(a===o?-1:1)*Math.sqrt(Math.abs((I*E-I*C*C-E*F*F)/(I*C*C+E*F*F)));p=O*M*C/P+(d+m)/2,s=Math.asin(((g-(v=O*-P*F/M+(g+b)/2))/P*1e9>>0)/1e9),h=Math.asin(((b-v)/P*1e9>>0)/1e9),0>(s=p>d?Math.PI-s:s)&&(s=2*Math.PI+s),0>(h=p>m?Math.PI-h:h)&&(h=2*Math.PI+h),o&&s>h&&(s-=2*Math.PI),!o&&h>s&&(h-=2*Math.PI)}var T=h-s;if(Math.abs(T)>S){var L=h,W=m,H=b;w=x(m=p+M*Math.cos(h=s+S*(o&&h>s?1:-1)),b=v+P*Math.sin(h),M,P,i,0,o,W,H,[h,L,p,v])}T=h-s;var G=Math.cos(s),q=Math.sin(s),R=Math.cos(h),_=Math.sin(h),Y=Math.tan(T/4),j=4/3*M*Y,N=4/3*P*Y,X=[d,g],B=[d+j*q,g-N*G],D=[m+j*_,b-N*R],Q=[m,b];if(B[0]=2*X[0]-B[0],B[1]=2*X[1]-B[1],f)return B.concat(D,Q,w);for(var U=[],Z=0,z=(w=B.concat(D,Q,w)).length;z>Z;Z+=1)U[Z]=Z%2?y(w[Z-1],w[Z],k).y:y(w[Z],w[Z+1],k).x;return U}var g=function(t,r,n){return r>t?r:t>n?n:t};function M(t,r,n,e){var i=t-n,a=r-e;return Math.sqrt(i*i+a*a)}var P=1e-4;function m(t,r,n,e,i,u){var c=-1,f=1/0,l=[n,e],s=20;u&&u>200&&(s=u/10);for(var h=1/s,p=h/10,v=0;s>=v;v++){var d=v*h,y=[i.apply(void 0,o([],a(t.concat([d])),!1)),i.apply(void 0,o([],a(r.concat([d])),!1))];f>(b=M(l[0],l[1],y[0],y[1]))&&(c=d,f=b)}if(0===c)return{x:t[0],y:r[0]};if(1===c){var x=t.length;return{x:t[x-1],y:r[x-1]}}f=1/0;for(v=0;32>v&&P<=p;v++){var g=c-p,m=c+p,b=(y=[i.apply(void 0,o([],a(t.concat([g])),!1)),i.apply(void 0,o([],a(r.concat([g])),!1))],M(l[0],l[1],y[0],y[1]));if(g>=0&&f>b)c=g,f=b;else{var S=[i.apply(void 0,o([],a(t.concat([m])),!1)),i.apply(void 0,o([],a(r.concat([m])),!1))],k=M(l[0],l[1],S[0],S[1]);1>=m&&f>k?(c=m,f=k):p*=.5}}return{x:i.apply(void 0,o([],a(t.concat([c])),!1)),y:i.apply(void 0,o([],a(r.concat([c])),!1))}}function b(t,r,n,e,i,a){var o=[n-t,e-r];if(function(t,r){return t[0]===r[0]&&t[1]===r[1]}(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-r)*(a-r));var u=[-o[1],o[0]];return function(t,r){var n=r[0],e=r[1],i=n*n+e*e;i>0&&(i=1/Math.sqrt(i)),t[0]=r[0]*i,t[1]=r[1]*i}(u,u),Math.abs(function(t,r){return t[0]*r[0]+t[1]*r[1]}([i-t,a-r],u))}function S(t,r,n,e,i){var a=1-i;return a*a*a*t+3*r*i*a*a+3*n*i*i*a+e*i*i*i}function k(t,r,n,e,i,a,o,u,c,f,l){var s=function(t,r,n,e,i,a,o,u,c,f,l){return m([t,n,i,o],[r,e,a,u],c,f,S,l)}(t,r,n,e,i,a,o,u,c,f,l);return M(s.x,s.y,c,f)}function w(t,r,n,e){var i=1-e;return i*i*t+2*e*i*r+e*e*n}function F(t,r,n,e,i,a,o,u){var c=function(t,r,n,e,i,a,o,u){return m([t,n,i],[r,e,a],o,u,w)}(t,r,n,e,i,a,o,u);return M(c.x,c.y,o,u)}function C(t,n,e){var i=t.parsedStyle,o=i.r,u=i.fill,c=i.stroke,f=i.pointerEvents,l=((i.lineWidth||0)+(i.increasedLineWidthForHitTesting||0))/2,s=M(o,o,n.x,n.y),h=a(r.isFillOrStrokeAffected(f,u,c),2),p=h[0],v=h[1];return p&&v||e?o+l>=s:p?o>=s:!!v&&(s>=o-l&&o+l>=s)}function A(t,r,n,e){return t/(n*n)+r/(e*e)}function I(t,n,e){var i=t.parsedStyle,o=i.rx,u=i.ry,c=i.lineWidth,f=i.increasedLineWidthForHitTesting,l=n.x,s=n.y,h=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),p=h[0],v=h[1],d=((c||0)+(f||0))/2,y=(l-o)*(l-o),x=(s-u)*(s-u);return p&&v||e?1>=A(y,x,o+d,u+d):p?1>=A(y,x,o,u):!!v&&(A(y,x,o-d,u-d)>=1&&1>=A(y,x,o+d,u+d))}function E(t,r,n,e,i,a){return!(t>i||i>t+n||r>a||a>r+e)}function O(t,r,n,e,i,a,o,u){var c=(Math.atan2(u-r,o-t)+2*Math.PI)%(2*Math.PI),f={x:t+n*Math.cos(c),y:r+n*Math.sin(c)};return M(f.x,f.y,o,u)<=a/2}function T(t,r,n,e,i,a,o){var u=i/2;return!(Math.min(t,n)-u>a||a>Math.max(t,n)+u||Math.min(r,e)-u>o||o>Math.max(r,e)+u)&&b(t,r,n,e,a,o)<=i/2}function L(t,r,n,e,i){var a=t.length;if(2>a)return!1;for(var o=0;a-1>o;o++){if(T(t[o][0],t[o][1],t[o+1][0],t[o+1][1],r,n,e))return!0}if(i){var u=t[0],c=t[a-1];if(T(u[0],u[1],c[0],c[1],r,n,e))return!0}return!1}var W=1e-6;function H(t){return W>Math.abs(t)?0:0>t?-1:1}function G(t,r,n){return!((n[0]-t[0])*(r[1]-t[1])!=(r[0]-t[0])*(n[1]-t[1])||Math.min(t[0],r[0])>n[0]||n[0]>Math.max(t[0],r[0])||Math.min(t[1],r[1])>n[1]||n[1]>Math.max(t[1],r[1]))}function q(t,r,n){var e=!1,i=t.length;if(2>=i)return!1;for(var a=0;i>a;a++){var o=t[a],u=t[(a+1)%i];if(G(o,u,[r,n]))return!0;H(o[1]-n)>0!=H(u[1]-n)>0&&0>H(r-(n-o[1])*(o[0]-u[0])/(o[1]-u[1])-o[0])&&(e=!e)}return e}function R(t,r,n){for(var e=!1,i=0;t.length>i;i++){if(e=q(t[i],r,n))break}return e}function _(t,n,e){var i=t.parsedStyle,o=i.x1,u=i.y1,c=i.x2,f=i.y2,l=i.lineWidth,s=i.increasedLineWidthForHitTesting,h=i.defX,p=void 0===h?0:h,v=i.defY,d=void 0===v?0:v;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!l)&&T(o,u,c,f,(l||0)+(s||0),n.x+p,n.y+d)}function Y(t,n,e,i,o,u){var c=t.parsedStyle,f=c.lineWidth,l=c.increasedLineWidthForHitTesting,s=c.defX,h=void 0===s?0:s,p=c.defY,v=void 0===p?0:p,d=c.path,y=d.segments,g=d.hasArc,M=d.polylines,P=d.polygons,m=a(r.isFillOrStrokeAffected(c.pointerEvents,(null==P?void 0:P.length)&&c.fill,c.stroke),2),b=m[0],S=m[1],w=r.getOrCalculatePathTotalLength(t),C=!1;return b||e?C=g?i(t,n):R(P,n.x+h,n.y+v)||R(M,n.x+h,n.y+v):((S||e)&&(C=function(t,r,n,e,i){for(var a=!1,o=r/2,u=0;t.length>u;u++){var c=t[u],f=c.currentPoint,l=c.params,s=c.prePoint,h=c.box;if(!h||E(h.x-o,h.y-o,h.width+r,h.height+r,n,e))switch(c.command){case"L":case"Z":if(a=T(s[0],s[1],f[0],f[1],r,n,e))return!0;break;case"Q":if(a=r/2>=F(s[0],s[1],l[1],l[2],l[3],l[4],n,e))return!0;break;case"C":if(a=r/2>=k(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],n,e,i))return!0;break;case"A":c.cubicParams||(c.cubicParams=x(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],l[7],void 0));for(var p=c.cubicParams,v=s,d=0;p.length>d;d+=6){var y=k(v[0],v[1],p[d],p[d+1],p[d+2],p[d+3],p[d+4],p[d+5],n,e,i);if(v=[p[d+4],p[d+5]],a=r/2>=y)return!0}}}return a}(y,(f||0)+(l||0),n.x+h,n.y+v,w)),C)}function j(t,n,e){var i=t.parsedStyle,o=i.lineWidth,u=i.increasedLineWidthForHitTesting,c=i.points,f=i.defX,l=void 0===f?0:f,s=i.defY,h=void 0===s?0:s,p=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),v=p[0],d=!1;return(p[1]||e)&&(d=L(c.points,(o||0)+(u||0),n.x+l,n.y+h,!0)),d||!v&&!e||(d=q(c.points,n.x+l,n.y+h)),d}function N(t,n,e){var i=t.parsedStyle,o=i.lineWidth,u=i.increasedLineWidthForHitTesting,c=i.points,f=i.defX,l=void 0===f?0:f,s=i.defY,h=void 0===s?0:s;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!o)&&L(c.points,(o||0)+(u||0),n.x+l,n.y+h,!1)}function X(t,n,e,i,o){var u=t.parsedStyle,c=u.radius,f=u.lineWidth,l=u.increasedLineWidthForHitTesting,s=u.width,h=u.height,p=a(r.isFillOrStrokeAffected(u.pointerEvents,u.fill,u.stroke),2),v=p[0],d=p[1],y=(f||0)+(l||0);if(c&&c.some((function(t){return 0!==t}))){var x=!1;return(d||e)&&(x=function(t,r,n,e,i,o,u,c){var f=a(i,4),l=f[0],s=f[1],h=f[2],p=f[3];return T(t+l,r,t+n-s,r,o,u,c)||T(t+n,r+s,t+n,r+e-h,o,u,c)||T(t+n-h,r+e,t+p,r+e,o,u,c)||T(t,r+e-p,t,r+l,o,u,c)||O(t+n-s,r+s,s,0,0,o,u,c)||O(t+n-h,r+e-h,h,0,0,o,u,c)||O(t+p,r+e-p,p,0,0,o,u,c)||O(t+l,r+l,l,0,0,o,u,c)}(0,0,s,h,c.map((function(t){return g(t,0,Math.min(Math.abs(s)/2,Math.abs(h)/2))})),y,n.x,n.y)),x||!v&&!e||(x=i(t,n)),x}var M=y/2;return v&&d||e?E(0-M,0-M,s+M,h+M,n.x,n.y):v?E(0,0,s,h,n.x,n.y):!!d&&function(t,r,n,e,i,a,o){var u=i/2;return E(t-u,r-u,n,i,a,o)||E(t+n-u,r-u,i,e,a,o)||E(t+u,r+e-u,n,i,a,o)||E(t-u,r+u,i,e,a,o)}(0,0,s,h,y,n.x,n.y)}function B(t,n,e,i,a,o){var u=t.parsedStyle,c=u.width,f=u.height;if("non-transparent-pixel"===u.pointerEvents){var l=a.config.offscreenCanvas,s=o.offscreenCanvasCreator.getOrCreateCanvas(l),h=o.offscreenCanvasCreator.getOrCreateContext(l,{willReadFrequently:!0});return s.width=c,s.height=f,a.defaultStyleRendererFactory[r.Shape.IMAGE].render(h,t.parsedStyle,t,void 0,void 0,void 0),h.getImageData(n.x,n.y,1,1).data.every((function(t){return 0!==t}))}return!0}var D=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.name="canvas-picker",r}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+r+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}(e,t),e.prototype.init=function(){var t,n=((t={})[r.Shape.CIRCLE]=C,t[r.Shape.ELLIPSE]=I,t[r.Shape.RECT]=X,t[r.Shape.LINE]=_,t[r.Shape.POLYLINE]=N,t[r.Shape.POLYGON]=j,t[r.Shape.PATH]=Y,t[r.Shape.TEXT]=function(){return!0},t[r.Shape.GROUP]=null,t[r.Shape.IMAGE]=B,t[r.Shape.HTML]=null,t[r.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new d)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(r.AbstractRendererPlugin);t.Plugin=D}));
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],r):r(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CanvasPicker={}),t.window.G)}(this,(function(t,r){"use strict";var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};function e(t,r,n,e){return new(n||(n=Promise))((function(i,a){function o(t){try{c(e.next(t))}catch(t){a(t)}}function u(t){try{c(e.throw(t))}catch(t){a(t)}}function c(t){var r;t.done?i(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(o,u)}c((e=e.apply(t,r||[])).next())}))}function i(t,r){var n,e,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(n=1,e&&(i=2&u[0]?e.return:u[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,u[1])).done)return i;switch(e=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,e=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&i[3]>u[1])){o.label=u[1];break}if(6===u[0]&&i[1]>o.label){o.label=i[1],i=u;break}if(i&&i[2]>o.label){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(t,o)}catch(t){u=[6,t],e=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function a(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,i,a=n.call(t),o=[];try{for(;(void 0===r||r-- >0)&&!(e=a.next()).done;)o.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function o(t,r,n){if(n||2===arguments.length)for(var e,i=0,a=r.length;a>i;i++)!e&&i in r||(e||(e=Array.prototype.slice.call(r,0,i)),e[i]=r[i]);return t.concat(e||Array.prototype.slice.call(r))}var u="undefined"!=typeof Float32Array?Float32Array:Array;function c(){var t=new u(3);return u!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function f(t,r,n,e){return t[0]=r,t[1]=n,t[2]=e,t}Math.hypot||(Math.hypot=function(){for(var t=0,r=arguments.length;r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)}),c(),function(){var t,r=(t=new u(2),u!=Float32Array&&(t[0]=0,t[1]=0),t)}();var l,s=c(),h=c(),p=c(),v=(l=new u(16),u!=Float32Array&&(l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[11]=0,l[12]=0,l[13]=0,l[14]=0),l[0]=1,l[5]=1,l[10]=1,l[15]=1,l),d=function(){function t(){var t=this;this.isHit=function(n,e,i,a){var o=t.context.pointInPathPickerFactory[n.nodeName];if(o){var u=function(t,r){var n=r[0],e=r[1],i=r[2],a=r[3],o=r[4],u=r[5],c=r[6],f=r[7],l=r[8],s=r[9],h=r[10],p=r[11],v=r[12],d=r[13],y=r[14],x=r[15],g=n*u-e*o,M=n*c-i*o,P=n*f-a*o,m=e*c-i*u,b=e*f-a*u,S=i*f-a*c,k=l*d-s*v,w=l*y-h*v,F=l*x-p*v,C=s*y-h*d,A=s*x-p*d,I=h*x-p*y,E=g*I-M*A+P*C+m*F-b*w+S*k;return E?(t[0]=(u*I-c*A+f*C)*(E=1/E),t[1]=(i*A-e*I-a*C)*E,t[2]=(d*S-y*b+x*m)*E,t[3]=(h*b-s*S-p*m)*E,t[4]=(c*F-o*I-f*w)*E,t[5]=(n*I-i*F+a*w)*E,t[6]=(y*P-v*S-x*M)*E,t[7]=(l*S-h*P+p*M)*E,t[8]=(o*A-u*F+f*k)*E,t[9]=(e*F-n*A-a*k)*E,t[10]=(v*b-d*P+x*g)*E,t[11]=(s*P-l*b-p*g)*E,t[12]=(u*w-o*C-c*k)*E,t[13]=(n*C-e*w+i*k)*E,t[14]=(d*M-v*m-y*g)*E,t[15]=(l*m-s*M+h*g)*E,t):null}(v,i),c=function(t,r,n){var e=r[0],i=r[1],a=r[2],o=n[3]*e+n[7]*i+n[11]*a+n[15];return t[0]=(n[0]*e+n[4]*i+n[8]*a+n[12])/(o=o||1),t[1]=(n[1]*e+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*e+n[6]*i+n[10]*a+n[14])/o,t}(h,f(p,e[0],e[1],0),u),l=n.getGeometryBounds().halfExtents,s=n.parsedStyle.anchor;if(c[0]+=(s&&s[0]||0)*l[0]*2,c[1]+=(s&&s[1]||0)*l[1]*2,o(n,new r.Point(c[0],c[1]),a,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(r,n){var e=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[r.nodeName];return i&&(e.beginPath(),i(e,r.parsedStyle),e.closePath()),e.isPointInPath(n.x,n.y)}}return t.prototype.apply=function(r,n){var a,o=this,u=r.renderingService,c=r.renderingContext;this.context=r,this.runtime=n;var f=null===(a=c.root)||void 0===a?void 0:a.ownerDocument;u.hooks.pick.tapPromise(t.tag,(function(t){return e(o,void 0,void 0,(function(){return i(this,(function(r){return[2,this.pick(f,t)]}))}))})),u.hooks.pickSync.tap(t.tag,(function(t){return o.pick(f,t)}))},t.prototype.pick=function(t,n){var e,i,a=n.topmost,o=n.position,u=f(s,o.x,o.y,0),c=t.elementsFromBBox(u[0],u[1],u[0],u[1]),l=[];try{for(var h=function(t){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&t[r],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),p=h.next();!p.done;p=h.next()){var v=p.value,d=v.getWorldTransform();if(this.isHit(v,u,d,!1)){var y=r.findClosestClipPathTarget(v);if(y){var x=y.parsedStyle.clipPath;if(this.isHit(x,u,x.getWorldTransform(),!0)){if(a)return n.picked=[v],n;l.push(v)}}else{if(a)return n.picked=[v],n;l.push(v)}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(e)throw e.error}}return n.picked=l,n},t.tag="CanvasPicker",t}();function y(t,r,n){return{x:t*Math.cos(n)-r*Math.sin(n),y:t*Math.sin(n)+r*Math.cos(n)}}function x(t,r,n,e,i,a,o,u,c,f){var l,s,h,p,v,d=t,g=r,M=n,P=e,m=u,b=c,S=120*Math.PI/180,k=Math.PI/180*(+i||0),w=[];if(f)s=f[0],h=f[1],p=f[2],v=f[3];else{g=(l=y(d,g,-k)).y;var F=((d=l.x)-(m=(l=y(m,b,-k)).x))/2,C=(g-(b=l.y))/2,A=F*F/(M*M)+C*C/(P*P);A>1&&(M*=A=Math.sqrt(A),P*=A);var I=M*M,E=P*P,O=(a===o?-1:1)*Math.sqrt(Math.abs((I*E-I*C*C-E*F*F)/(I*C*C+E*F*F)));p=O*M*C/P+(d+m)/2,s=Math.asin(((g-(v=O*-P*F/M+(g+b)/2))/P*1e9>>0)/1e9),h=Math.asin(((b-v)/P*1e9>>0)/1e9),0>(s=p>d?Math.PI-s:s)&&(s=2*Math.PI+s),0>(h=p>m?Math.PI-h:h)&&(h=2*Math.PI+h),o&&s>h&&(s-=2*Math.PI),!o&&h>s&&(h-=2*Math.PI)}var T=h-s;if(Math.abs(T)>S){var L=h,W=m,H=b;w=x(m=p+M*Math.cos(h=s+S*(o&&h>s?1:-1)),b=v+P*Math.sin(h),M,P,i,0,o,W,H,[h,L,p,v])}T=h-s;var G=Math.cos(s),q=Math.sin(s),R=Math.cos(h),_=Math.sin(h),Y=Math.tan(T/4),j=4/3*M*Y,N=4/3*P*Y,X=[d,g],B=[d+j*q,g-N*G],D=[m+j*_,b-N*R],Q=[m,b];if(B[0]=2*X[0]-B[0],B[1]=2*X[1]-B[1],f)return B.concat(D,Q,w);for(var U=[],Z=0,z=(w=B.concat(D,Q,w)).length;z>Z;Z+=1)U[Z]=Z%2?y(w[Z-1],w[Z],k).y:y(w[Z],w[Z+1],k).x;return U}var g=function(t,r,n){return r>t?r:t>n?n:t};function M(t,r,n,e){var i=t-n,a=r-e;return Math.sqrt(i*i+a*a)}var P=1e-4;function m(t,r,n,e,i,u){var c=-1,f=1/0,l=[n,e],s=20;u&&u>200&&(s=u/10);for(var h=1/s,p=h/10,v=0;s>=v;v++){var d=v*h,y=[i.apply(void 0,o([],a(t.concat([d])),!1)),i.apply(void 0,o([],a(r.concat([d])),!1))];f>(b=M(l[0],l[1],y[0],y[1]))&&(c=d,f=b)}if(0===c)return{x:t[0],y:r[0]};if(1===c){var x=t.length;return{x:t[x-1],y:r[x-1]}}f=1/0;for(v=0;32>v&&P<=p;v++){var g=c-p,m=c+p,b=(y=[i.apply(void 0,o([],a(t.concat([g])),!1)),i.apply(void 0,o([],a(r.concat([g])),!1))],M(l[0],l[1],y[0],y[1]));if(g>=0&&f>b)c=g,f=b;else{var S=[i.apply(void 0,o([],a(t.concat([m])),!1)),i.apply(void 0,o([],a(r.concat([m])),!1))],k=M(l[0],l[1],S[0],S[1]);1>=m&&f>k?(c=m,f=k):p*=.5}}return{x:i.apply(void 0,o([],a(t.concat([c])),!1)),y:i.apply(void 0,o([],a(r.concat([c])),!1))}}function b(t,r,n,e,i,a){var o=[n-t,e-r];if(function(t,r){return t[0]===r[0]&&t[1]===r[1]}(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-r)*(a-r));var u=[-o[1],o[0]];return function(t,r){var n=r[0],e=r[1],i=n*n+e*e;i>0&&(i=1/Math.sqrt(i)),t[0]=r[0]*i,t[1]=r[1]*i}(u,u),Math.abs(function(t,r){return t[0]*r[0]+t[1]*r[1]}([i-t,a-r],u))}function S(t,r,n,e,i){var a=1-i;return a*a*a*t+3*r*i*a*a+3*n*i*i*a+e*i*i*i}function k(t,r,n,e,i,a,o,u,c,f,l){var s=function(t,r,n,e,i,a,o,u,c,f,l){return m([t,n,i,o],[r,e,a,u],c,f,S,l)}(t,r,n,e,i,a,o,u,c,f,l);return M(s.x,s.y,c,f)}function w(t,r,n,e){var i=1-e;return i*i*t+2*e*i*r+e*e*n}function F(t,r,n,e,i,a,o,u){var c=function(t,r,n,e,i,a,o,u){return m([t,n,i],[r,e,a],o,u,w)}(t,r,n,e,i,a,o,u);return M(c.x,c.y,o,u)}function C(t,n,e){var i=t.parsedStyle,o=i.r,u=i.fill,c=i.stroke,f=i.pointerEvents,l=((i.lineWidth||0)+(i.increasedLineWidthForHitTesting||0))/2,s=M(o,o,n.x,n.y),h=a(r.isFillOrStrokeAffected(f,u,c),2),p=h[0],v=h[1];return p&&v||e?o+l>=s:p?o>=s:!!v&&(s>=o-l&&o+l>=s)}function A(t,r,n,e){return t/(n*n)+r/(e*e)}function I(t,n,e){var i=t.parsedStyle,o=i.rx,u=i.ry,c=i.lineWidth,f=i.increasedLineWidthForHitTesting,l=n.x,s=n.y,h=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),p=h[0],v=h[1],d=((c||0)+(f||0))/2,y=(l-o)*(l-o),x=(s-u)*(s-u);return p&&v||e?1>=A(y,x,o+d,u+d):p?1>=A(y,x,o,u):!!v&&(A(y,x,o-d,u-d)>=1&&1>=A(y,x,o+d,u+d))}function E(t,r,n,e,i,a){return!(t>i||i>t+n||r>a||a>r+e)}function O(t,r,n,e,i,a,o,u){var c=(Math.atan2(u-r,o-t)+2*Math.PI)%(2*Math.PI),f={x:t+n*Math.cos(c),y:r+n*Math.sin(c)};return M(f.x,f.y,o,u)<=a/2}function T(t,r,n,e,i,a,o){var u=i/2;return!(Math.min(t,n)-u>a||a>Math.max(t,n)+u||Math.min(r,e)-u>o||o>Math.max(r,e)+u)&&b(t,r,n,e,a,o)<=i/2}function L(t,r,n,e,i){var a=t.length;if(2>a)return!1;for(var o=0;a-1>o;o++){if(T(t[o][0],t[o][1],t[o+1][0],t[o+1][1],r,n,e))return!0}if(i){var u=t[0],c=t[a-1];if(T(u[0],u[1],c[0],c[1],r,n,e))return!0}return!1}var W=1e-6;function H(t){return W>Math.abs(t)?0:0>t?-1:1}function G(t,r,n){return!((n[0]-t[0])*(r[1]-t[1])!=(r[0]-t[0])*(n[1]-t[1])||Math.min(t[0],r[0])>n[0]||n[0]>Math.max(t[0],r[0])||Math.min(t[1],r[1])>n[1]||n[1]>Math.max(t[1],r[1]))}function q(t,r,n){var e=!1,i=t.length;if(2>=i)return!1;for(var a=0;i>a;a++){var o=t[a],u=t[(a+1)%i];if(G(o,u,[r,n]))return!0;H(o[1]-n)>0!=H(u[1]-n)>0&&0>H(r-(n-o[1])*(o[0]-u[0])/(o[1]-u[1])-o[0])&&(e=!e)}return e}function R(t,r,n){for(var e=!1,i=0;t.length>i;i++){if(e=q(t[i],r,n))break}return e}function _(t,n,e){var i=t.parsedStyle,o=i.x1,u=i.y1,c=i.x2,f=i.y2,l=i.lineWidth,s=i.increasedLineWidthForHitTesting,h=i.defX,p=void 0===h?0:h,v=i.defY,d=void 0===v?0:v;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!l)&&T(o,u,c,f,(l||0)+(s||0),n.x+p,n.y+d)}function Y(t,n,e,i,o,u){var c=t.parsedStyle,f=c.lineWidth,l=c.increasedLineWidthForHitTesting,s=c.defX,h=void 0===s?0:s,p=c.defY,v=void 0===p?0:p,d=c.path,y=d.segments,g=d.hasArc,M=d.polylines,P=d.polygons,m=a(r.isFillOrStrokeAffected(c.pointerEvents,(null==P?void 0:P.length)&&c.fill,c.stroke),2),b=m[0],S=m[1],w=r.getOrCalculatePathTotalLength(t),C=!1;return b||e?C=g?i(t,n):R(P,n.x+h,n.y+v)||R(M,n.x+h,n.y+v):((S||e)&&(C=function(t,r,n,e,i){for(var a=!1,o=r/2,u=0;t.length>u;u++){var c=t[u],f=c.currentPoint,l=c.params,s=c.prePoint,h=c.box;if(!h||E(h.x-o,h.y-o,h.width+r,h.height+r,n,e))switch(c.command){case"L":case"Z":if(a=T(s[0],s[1],f[0],f[1],r,n,e))return!0;break;case"Q":if(a=r/2>=F(s[0],s[1],l[1],l[2],l[3],l[4],n,e))return!0;break;case"C":if(a=r/2>=k(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],n,e,i))return!0;break;case"A":c.cubicParams||(c.cubicParams=x(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],l[7],void 0));for(var p=c.cubicParams,v=s,d=0;p.length>d;d+=6){var y=k(v[0],v[1],p[d],p[d+1],p[d+2],p[d+3],p[d+4],p[d+5],n,e,i);if(v=[p[d+4],p[d+5]],a=r/2>=y)return!0}}}return a}(y,(f||0)+(l||0),n.x+h,n.y+v,w)),C)}function j(t,n,e){var i=t.parsedStyle,o=i.lineWidth,u=i.increasedLineWidthForHitTesting,c=i.points,f=i.defX,l=void 0===f?0:f,s=i.defY,h=void 0===s?0:s,p=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),v=p[0],d=!1;return(p[1]||e)&&(d=L(c.points,(o||0)+(u||0),n.x+l,n.y+h,!0)),d||!v&&!e||(d=q(c.points,n.x+l,n.y+h)),d}function N(t,n,e){var i=t.parsedStyle,o=i.lineWidth,u=i.increasedLineWidthForHitTesting,c=i.points,f=i.defX,l=void 0===f?0:f,s=i.defY,h=void 0===s?0:s;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!o)&&L(c.points,(o||0)+(u||0),n.x+l,n.y+h,!1)}function X(t,n,e,i,o){var u=t.parsedStyle,c=u.radius,f=u.lineWidth,l=u.increasedLineWidthForHitTesting,s=u.width,h=u.height,p=a(r.isFillOrStrokeAffected(u.pointerEvents,u.fill,u.stroke),2),v=p[0],d=p[1],y=(f||0)+(l||0);if(c&&c.some((function(t){return 0!==t}))){var x=!1;return(d||e)&&(x=function(t,r,n,e,i,o,u,c){var f=a(i,4),l=f[0],s=f[1],h=f[2],p=f[3];return T(t+l,r,t+n-s,r,o,u,c)||T(t+n,r+s,t+n,r+e-h,o,u,c)||T(t+n-h,r+e,t+p,r+e,o,u,c)||T(t,r+e-p,t,r+l,o,u,c)||O(t+n-s,r+s,s,0,0,o,u,c)||O(t+n-h,r+e-h,h,0,0,o,u,c)||O(t+p,r+e-p,p,0,0,o,u,c)||O(t+l,r+l,l,0,0,o,u,c)}(0,0,s,h,c.map((function(t){return g(t,0,Math.min(Math.abs(s)/2,Math.abs(h)/2))})),y,n.x,n.y)),x||!v&&!e||(x=i(t,n)),x}var M=y/2;return v&&d||e?E(0-M,0-M,s+M,h+M,n.x,n.y):v?E(0,0,s,h,n.x,n.y):!!d&&function(t,r,n,e,i,a,o){var u=i/2;return E(t-u,r-u,n,i,a,o)||E(t+n-u,r-u,i,e,a,o)||E(t+u,r+e-u,n,i,a,o)||E(t-u,r+u,i,e,a,o)}(0,0,s,h,y,n.x,n.y)}function B(t,n,e,i,a,o){var u=t.parsedStyle,c=u.width,f=u.height;if("non-transparent-pixel"===u.pointerEvents){var l=a.config.offscreenCanvas,s=o.offscreenCanvasCreator.getOrCreateCanvas(l),h=o.offscreenCanvasCreator.getOrCreateContext(l,{willReadFrequently:!0});return s.width=c,s.height=f,a.defaultStyleRendererFactory[r.Shape.IMAGE].render(h,t.parsedStyle,t,void 0,void 0,void 0),h.getImageData(n.x,n.y,1,1).data.every((function(t){return 0!==t}))}return!0}var D=function(t){function e(){var r=t.apply(this,o([],a(arguments),!1))||this;return r.name="canvas-picker",r}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+r+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}(e,t),e.prototype.init=function(){var t,n=((t={})[r.Shape.CIRCLE]=C,t[r.Shape.ELLIPSE]=I,t[r.Shape.RECT]=X,t[r.Shape.LINE]=_,t[r.Shape.POLYLINE]=N,t[r.Shape.POLYGON]=j,t[r.Shape.PATH]=Y,t[r.Shape.TEXT]=function(){return!0},t[r.Shape.GROUP]=null,t[r.Shape.IMAGE]=B,t[r.Shape.HTML]=null,t[r.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new d)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(r.AbstractRendererPlugin);t.Plugin=D}));
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@antv/g-plugin-canvas-picker",
"version": "1.10.21",
"version": "1.10.22",
"description": "A G plugin for picking in canvas",

@@ -38,6 +38,6 @@ "keywords": [

"tslib": "^2.5.3",
"@antv/g-lite": "1.2.19",
"@antv/g-math": "2.0.2",
"@antv/g-plugin-canvas-path-generator": "1.3.19",
"@antv/g-plugin-canvas-renderer": "1.9.21"
"@antv/g-plugin-canvas-path-generator": "1.3.20",
"@antv/g-lite": "1.2.20",
"@antv/g-plugin-canvas-renderer": "1.9.22"
},

@@ -44,0 +44,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc