Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boring-avatars

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boring-avatars - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

build/index.js

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

!function(e,t){if("object"===typeof exports&&"object"===typeof module)module.exports=t(require("react"));else if("function"===typeof define&&define.amd)define(["react"],t);else{var r="object"===typeof exports?t(require("react")):t(e.react);for(var n in r)("object"===typeof exports?exports:e)[n]=r[n]}}(this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(2)},function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.r(t);var a=r(0),l=r.n(a),o=function(e){var t=Array.from(e),r=0;return t.forEach((function(e){return r+=e.charCodeAt(0)})),r},i=function(e,t){return e%t},c=12,f=c/3;function u(e,t,r,n){switch(n){case 0:return t[i(Math.floor(e/1%10)+n,r)];case 1:return t[i(Math.floor(e/10%10)+n,r)];case 2:return t[i(Math.floor(e/1%10)+n,r)];case 3:return t[i(Math.floor(e/10%10)+n,r)];default:return t[i(e+n,r)]}}function s(e,t,r){var n=new Array(f).fill(t);return n[r]=e,r===f-1?n[0]=e:n[r+1]=e,n}function m(e,t){var r=o(t),n=e&&e.length,a=i(r,f),l=u(r,e,n,i(r,c+3)),m=u(r,e,n,i(r,2*c)),p=function(e,t,r){return Array.from({length:f},(function(n,a){return u(e,t,r,a)}))}(r,e,n),d=s(l,"none",a),h=s("none",m,a);return p.concat(d,h)}var p=function(e){var t=m(e.colors,e.name);return l.a.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},l.a.createElement("svg",{viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.a.createElement("path",{d:"M80 40A40 40 0 0040 0v40h40z",fill:t[0]}),l.a.createElement("path",{d:"M40 0A40 40 0 000 40h40V0z",fill:t[1]}),l.a.createElement("path",{d:"M0 40a40 40 0 0040 40V40H0z",fill:t[2]}),l.a.createElement("path",{d:"M40 80a40 40 0 0040-40H40v40z",fill:t[3]}),l.a.createElement("path",{d:"M70 40a30 30 0 00-30-30v30h30z",fill:t[4]}),l.a.createElement("path",{d:"M40 10a30 30 0 00-30 30h30V10z",fill:t[5]}),l.a.createElement("path",{d:"M10 40a30 30 0 0030 30V40H10z",fill:t[6]}),l.a.createElement("path",{d:"M40 70a30 30 0 0030-30H40v30z",fill:t[7]}),l.a.createElement("path",{d:"M60 40a20 20 0 00-20-20v20h20z",fill:t[8]}),l.a.createElement("path",{d:"M40 20a20 20 0 00-20 20h20V20z",fill:t[9]}),l.a.createElement("path",{d:"M20 40a20 20 0 0020 20V40H20z",fill:t[10]}),l.a.createElement("path",{d:"M40 60a20 20 0 0020-20H40v20z",fill:t[11]})))},d=4,h=80;function v(e,t,r,n){return t[i(e+n,r)]}function y(e,t){var r=i(e*t,h/4);return e%2===0?-r:r}function b(e,t){var r=i(e*t,h/4);return e%2===0?r:-r}var g=function(e){var t=function(e,t){var r=o(e),n=t&&t.length;return Array.from({length:d},(function(e,a){return{color:v(r,t,n,a),translateX:y(r,a),translateY:b(r,a),rotate:(l=r,i(l,360)+" "+h/2+" "+h/2)};var l}))}(e.name,e.colors);return a.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},a.createElement("svg",Object.assign({viewBox:"0 0 "+h+" "+h,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a.createElement("mask",{id:"prefix__a",maskUnits:"userSpaceOnUse",x:0,y:0,width:h,height:h},a.createElement("rect",{width:h,height:h,rx:h/2,fill:"#fff"})),a.createElement("g",{mask:"url(#prefix__a)"},a.createElement("rect",{width:h,height:h,rx:h/2,fill:t[0].color}),a.createElement("path",{d:"M0 64.167l11.667-32.5 44.166 12.5 15.834 44.166-60 22.5L0 64.167z",fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+")"}),a.createElement("circle",{cx:h/2,cy:h/2,fill:t[2].color,r:17.5,transform:"translate("+t[3].translateX+" "+t[3].translateY+")"}),a.createElement("line",{x1:"0",y1:h/2,x2:"80",y2:h/2,strokeWidth:2,stroke:t[3].color,transform:"translate("+t[3].translateX+" "+t[3].translateY+") rotate("+t[3].rotate+")"}))))},E=function(e){var t=e.variant,r=e.colors,a=e.name,o=e.size,i=n(e,["variant","colors","name","size"]);return"abstract"===t?l.a.createElement(g,Object.assign({colors:r,name:a,size:o},i)):l.a.createElement(p,Object.assign({colors:r,name:a,size:o},i))};E.defaultProps={variant:"geometric",colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:"abcdefg",size:32};var x=E;t.default=x}])}));
!function(e,t){if("object"===typeof exports&&"object"===typeof module)module.exports=t(require("react"));else if("function"===typeof define&&define.amd)define(["react"],t);else{var r="object"===typeof exports?t(require("react")):t(e.react);for(var a in r)("object"===typeof exports?exports:e)[a]=r[a]}}(this,(function(e){return function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(2)},function(e,t,r){"use strict";function a(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},l=Object.keys(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}r.r(t);var n=r(0),l=r.n(n),o=function(e){var t=Array.from(e),r=0;return t.forEach((function(e){return r+=e.charCodeAt(0)})),r},i=function(e,t){return e%t},c=function(e,t){return Math.floor(e/Math.pow(10,t)%10)},s=function(e,t){return 180*Math.atan2(t,e)/Math.PI},f=function(e,t,r){var a=e%t;return r&&c(e,r)%2===0?-a:a},u=function(e,t,r){return t[e%r]},m=function(e){return"#"===e.slice(0,1)&&(e=e.slice(1)),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"black":"white"},p=12,h=p/3;function d(e,t,r,a){switch(a){case 0:return t[i(Math.floor(e/1%10)+a,r)];case 1:return t[i(Math.floor(e/10%10)+a,r)];case 2:return t[i(Math.floor(e/1%10)+a,r)];case 3:return t[i(Math.floor(e/10%10)+a,r)];default:return t[i(e+a,r)]}}function g(e,t,r){var a=new Array(h).fill(t);return a[r]=e,r===h-1?a[0]=e:a[r+1]=e,a}function E(e,t){var r=o(t),a=e&&e.length,n=i(r,h),l=d(r,e,a,i(r,p+3)),c=d(r,e,a,i(r,2*p)),s=function(e,t,r){return Array.from({length:h},(function(a,n){return d(e,t,r,n)}))}(r,e,a),f=g(l,"none",n),u=g("none",c,n);return s.concat(f,u)}var v=function(e){var t=E(e.colors,e.name);return l.a.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},l.a.createElement("svg",{viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.a.createElement("path",{d:"M80 40A40 40 0 0040 0v40h40z",fill:t[0]}),l.a.createElement("path",{d:"M40 0A40 40 0 000 40h40V0z",fill:t[1]}),l.a.createElement("path",{d:"M0 40a40 40 0 0040 40V40H0z",fill:t[2]}),l.a.createElement("path",{d:"M40 80a40 40 0 0040-40H40v40z",fill:t[3]}),l.a.createElement("path",{d:"M70 40a30 30 0 00-30-30v30h30z",fill:t[4]}),l.a.createElement("path",{d:"M40 10a30 30 0 00-30 30h30V10z",fill:t[5]}),l.a.createElement("path",{d:"M10 40a30 30 0 0030 30V40H10z",fill:t[6]}),l.a.createElement("path",{d:"M40 70a30 30 0 0030-30H40v30z",fill:t[7]}),l.a.createElement("path",{d:"M60 40a20 20 0 00-20-20v20h20z",fill:t[8]}),l.a.createElement("path",{d:"M40 20a20 20 0 00-20 20h20V20z",fill:t[9]}),l.a.createElement("path",{d:"M20 40a20 20 0 0020 20V40H20z",fill:t[10]}),l.a.createElement("path",{d:"M40 60a20 20 0 0020-20H40v20z",fill:t[11]})))},w=4,x=80;var y=function(e){var t=function(e,t){var r=o(e),a=t&&t.length;return Array.from({length:w},(function(e,n){return{color:u(r+n,t,a),translateX:f(r/(n+1),x/13-8*n,1),translateY:f(r/(n+1),x/13-8*n,2),rotate:f(r/(n+1),360)}}))}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 "+x+" "+x,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"prefix__a",maskUnits:"userSpaceOnUse",x:0,y:0,width:x,height:x},n.createElement("rect",{width:x,height:x,rx:x/2,fill:"#fff"})),n.createElement("g",{mask:"url(#prefix__a)"},n.createElement("rect",{width:x,height:x,rx:x/2,fill:t[0].color}),n.createElement("g",{transform:"rotate("+t[0].rotate+" "+x/2+" "+x/2+")"},n.createElement("path",{d:"M8 56.5L19.667 24L63.833 36.5L79.667 80.666L19.667 103.166L8 56.5Z",fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" "+x/2+" "+x+")"})),n.createElement("circle",{cx:x/2,cy:x/2,fill:t[2].color,r:17.5,transform:"translate("+t[2].translateX+" "+t[2].translateY+")"}),n.createElement("line",{x1:"0",y1:x/2,x2:"80",y2:x/2,strokeWidth:2,stroke:t[3].color,transform:"translate("+t[3].translateX+" "+t[3].translateY+") rotate("+t[3].rotate+" "+x/2+" "+x/2+")"}))))},b=36;function z(e,t,r){return t[e%r]}function M(e,t,r){var a=e%t;return r&&c(e,r)%2===0?-a:a}var _=function(e){var t=function(e,t){var r,a=o(e),n=t&&t.length,l=z(a,t,n),i=M(a,10,1),c=i<5?i+b/9:i,s=M(a,10,2),f=s<5?s+b/9:s;return{wrapperColor:l,faceColor:m(l),backgroundColor:z(a+13,t,n),wrapperTranslateX:c,wrapperTranslateY:f,wrapperRotate:M(a,360),isCircle:(r=a,!(r%10%2)),eyeSpread:M(a,5),mouthSpread:M(a,5),faceRotate:M(a,10,3),faceTranslateX:c>b/6?c/2:M(a,8,1),faceTranslateY:f>b/6?f/2:M(a,7,2)}}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 "+b+" "+b,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"prefix__a",maskUnits:"userSpaceOnUse",x:0,y:0,width:b,height:b},n.createElement("rect",{width:b,height:b,rx:20,fill:"white"})),n.createElement("g",{mask:"url(#prefix__a)",fill:"transparent"},n.createElement("rect",{width:b,height:b,rx:20,fill:t.backgroundColor}),n.createElement("rect",{x:"0",y:"0",width:b,height:b,transform:"translate("+t.wrapperTranslateX+" "+t.wrapperTranslateY+") rotate("+t.wrapperRotate+")","transform-origin":"50%",fill:t.wrapperColor,rx:t.isCircle?b:b/6}),n.createElement("g",{transform:"translate("+t.faceTranslateX+" "+t.faceTranslateY+") rotate("+t.faceRotate+")","transform-origin":"50%"},n.createElement("path",{d:"M15 "+(18+t.mouthSpread)+"c2 1 4 1 6 0",stroke:t.faceColor,fill:"none",strokeLinecap:"round"}),n.createElement("rect",{x:12-t.eyeSpread,y:14,width:2,height:2,rx:1,stroke:"none",fill:t.faceColor}),n.createElement("rect",{x:22+t.eyeSpread,y:14,width:2,height:2,rx:1,stroke:"none",fill:t.faceColor})))))},k=18,O="#fcfcfc",C="#03030b",j="#fff";function S(e,t,r){return t[e%r]}function B(e,t,r){var a=e%t;return r&&c(e,r)%2===0?-a:a}var T=function(e){var t=function(e,t){var r=o(e),a=t&&t.length,n=B(r,k/2-2,1),l=B(r,k/2-2,2),i=s(n,l);return{backgroundColor:S(r,t,a),scleraColor:O,pupilColor:C,lightColor:j,irisColor:S(r+2,t,a),wrapperTranslateX:n,wrapperTranslateY:l,wrapperRotate:-(180-i)}}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"prefix__a",maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36},n.createElement("path",{d:"M36 18c0-9.941-8.059-18-18-18S0 8.059 0 18s8.059 18 18 18 18-8.059 18-18z",fill:"#fff"})),n.createElement("g",{mask:"url(#prefix__a)"},n.createElement("path",{d:"M36 18c0-9.941-8.059-18-18-18S0 8.059 0 18s8.059 18 18 18 18-8.059 18-18z",fill:t.backgroundColor}),n.createElement("path",{fill:"#fff","fill-opacity":"0.3",d:"M0 0h36v18H0z"}),n.createElement("mask",{id:"prefix__b",maskUnits:"userSpaceOnUse",x:4,y:11,width:28,height:14},n.createElement("path",{d:"M18 11C7.818 11 4 18 4 18s5 7 14 7 14-7 14-7-3.818-7-14-7z",fill:"#fff"})),n.createElement("g",{mask:"url(#prefix__b)"},n.createElement("path",{d:"M18 11C8 11 4 18 4 18s5 7 14 7 14-7 14-7-4-7-14-7z",fill:t.scleraColor}),n.createElement("g",{transform:"translate("+t.wrapperTranslateX+" "+t.wrapperTranslateY+") rotate("+t.wrapperRotate+")","transform-origin":"50%"},n.createElement("circle",{cx:18,cy:18,r:10,fill:t.irisColor}),n.createElement("circle",{cx:25,cy:18,r:1,fill:t.lightColor}),n.createElement("circle",{cx:18,cy:18,r:4,fill:t.pupilColor}))))))},X=3,Y=80;var L=function(e){var t=function(e,t){var r=o(e),a=t&&t.length;return Array.from({length:X},(function(e,n){return{color:u(r+n,t,a),translateX:f(r*(n+1),Y/10,1),translateY:f(r*(n+1),Y/10,2),scale:1+f(r*(n+1),Y/20)/10,rotate:f(r*(n+1),360,1)}}))}(e.name,e.colors);return n.createElement("div",{style:{display:"inline-block",width:e.size,height:e.size}},n.createElement("svg",Object.assign({viewBox:"0 0 "+Y+" "+Y,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("mask",{id:"prefix__a",maskUnits:"userSpaceOnUse",x:0,y:0,width:Y,height:Y},n.createElement("path",{d:"M80 40C80 17.909 62.091 0 40 0S0 17.909 0 40s17.909 40 40 40 40-17.909 40-40z",fill:"#fff"})),n.createElement("g",{mask:"url(#prefix__a)"},n.createElement("path",{d:"M80 40C80 17.909 62.091 0 40 0S0 17.909 0 40s17.909 40 40 40 40-17.909 40-40z",fill:t[0].color}),n.createElement("path",{filter:"url(#prefix__filter0_f)",d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" "+Y/2+" "+Y/2+") scale("+t[2].scale+")"}),n.createElement("path",{filter:"url(#prefix__filter0_f)",style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:t[2].color,transform:"translate("+t[2].translateX+" "+t[2].translateY+") rotate("+t[2].rotate+" "+Y/2+" "+Y/2+") scale("+t[2].scale+")"})),n.createElement("defs",null,n.createElement("filter",{id:"prefix__filter0_f",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},n.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),n.createElement("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),n.createElement("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"})))))},U=function(e){var t=e.variant,r=e.colors,n=e.name,o=e.size,i=a(e,["variant","colors","name","size"]);return"abstract"===t?l.a.createElement(y,Object.assign({colors:r,name:n,size:o},i)):"beam"===t?l.a.createElement(_,Object.assign({colors:r,name:n,size:o},i)):"eye"===t?l.a.createElement(T,Object.assign({colors:r,name:n,size:o},i)):"marble"===t?l.a.createElement(L,Object.assign({colors:r,name:n,size:o},i)):l.a.createElement(v,Object.assign({colors:r,name:n,size:o},i))};U.defaultProps={variant:"geometric",colors:["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:"abcdefg",size:40};var A=U;t.default=A}])}));
//# sourceMappingURL=index.js.map
{
"name": "boring-avatars",
"version": "1.2.1",
"version": "1.2.2",
"main": "build/index.js",

@@ -5,0 +5,0 @@ "scripts": {

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