atomic-spinner
Advanced tools
Comparing version 1.0.22 to 1.0.23
/*! For license information please see index.js.LICENSE.txt */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("atomic-spinner",[],t):"object"==typeof exports?exports["atomic-spinner"]=t():e["atomic-spinner"]=t()}(self,(()=>(()=>{var e={49:(e,t,r)=>{"use strict";var n=r(444);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},507:(e,t,r)=>{e.exports=r(49)()},444:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},257:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator,y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,h={};function v(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||y}function b(){}function g(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||y}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var _=g.prototype=new b;_.constructor=g,m(_,v.prototype),_.isPureReactComponent=!0;var P=Array.isArray,E=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,n){var o,a={},i=null,c=null;if(null!=t)for(o in void 0!==t.ref&&(c=t.ref),void 0!==t.key&&(i=""+t.key),t)E.call(t,o)&&!C.hasOwnProperty(o)&&(a[o]=t[o]);var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){for(var l=Array(u),s=0;s<u;s++)l[s]=arguments[s+2];a.children=l}if(e&&e.defaultProps)for(o in u=e.defaultProps)void 0===a[o]&&(a[o]=u[o]);return{$$typeof:r,type:e,key:i,ref:c,props:a,_owner:S.current}}function k(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var O=/\/+/g;function x(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,o,a,i){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var u=!1;if(null===e)u=!0;else switch(c){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case r:case n:u=!0}}if(u)return i=i(u=e),e=""===a?"."+x(u,0):a,P(i)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),R(i,t,o,"",(function(e){return e}))):null!=i&&(k(i)&&(i=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||u&&u.key===i.key?"":(""+i.key).replace(O,"$&/")+"/")+e)),t.push(i)),1;if(u=0,a=""===a?".":a+":",P(e))for(var l=0;l<e.length;l++){var s=a+x(c=e[l],l);u+=R(c,t,o,s,i)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),l=0;!(c=e.next()).done;)u+=R(c=c.value,t,o,s=a+x(c,l++),i);else if("object"===c)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function j(e,t,r){if(null==e)return e;var n=[],o=0;return R(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var T={current:null},M={transition:null},$={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:M,ReactCurrentOwner:S};t.Children={map:j,forEach:function(e,t,r){j(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=i,t.PureComponent=g,t.StrictMode=a,t.Suspense=s,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),a=e.key,i=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,c=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)E.call(t,l)&&!C.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==u?u[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){u=Array(l);for(var s=0;s<l;s++)u[s]=arguments[s+2];o.children=u}return{$$typeof:r,type:e.type,key:a,ref:i,props:o,_owner:c}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=w,t.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=k,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=M.transition;M.transition={};try{e()}finally{M.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return T.current.useCallback(e,t)},t.useContext=function(e){return T.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return T.current.useDeferredValue(e)},t.useEffect=function(e,t){return T.current.useEffect(e,t)},t.useId=function(){return T.current.useId()},t.useImperativeHandle=function(e,t,r){return T.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return T.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return T.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return T.current.useMemo(e,t)},t.useReducer=function(e,t,r){return T.current.useReducer(e,t,r)},t.useRef=function(e){return T.current.useRef(e)},t.useState=function(e){return T.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return T.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return T.current.useTransition()},t.version="18.2.0"},959:(e,t,r)=>{"use strict";e.exports=r(257)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>y});var e=r(959),t=r(507),o=r.n(t);const a=function(t){var r=t.pathDefinitionId,n=t.color,o=t.width,a=t.rotationAngle;return e.createElement("g",{transform:"rotate(".concat(a," 50 50)")},e.createElement("use",{href:"#".concat(r),stroke:n,strokeWidth:o}))};var i=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=[];const u=function(t){var r=t.pathDefinitionId,n=t.rotationAngle,o=t.orbitTime,a=t.spacetimeOffset,u=t.size,l=t.colorPalette;return e.createElement("g",{"data-testid":"electron",transform:"rotate(".concat(n," 50 50)")},e.createElement("circle",{cx:"50",cy:"15",r:u,fill:(c.length||(c=i([],l,!0)),c.pop())},e.createElement("animateMotion",{dur:"".concat(o,"s"),repeatCount:"indefinite",begin:"".concat(a,"s")},e.createElement("mpath",{href:"#".concat(r)}))))};var l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)},s=function(t){var r=t.particleFillColor,n=t.particleBorderColor,o=t.particleBorderWidth,a=t.particlesPerLayer,i=t.particleSize,c=t.distanceFromCenter,u=t.orbitTime,s=t.startingAngle,f=Array.from({length:a}).map((function(t,u){var f=s+u*(2*Math.PI/a),p={cx:50+(a>1?c*Math.cos(f):0),cy:50+(a>1?c*Math.sin(f):0)},d=Math.min(o,i/3);return e.createElement(e.Fragment,{key:"particle-".concat(f)},d>0&&0===u&&e.createElement("mask",{id:"layer-".concat(s,"-bottom-particle")},e.createElement("rect",{x:"0",y:"0",width:"100",height:"100",fill:"white"}),e.createElement("circle",l({},p,{r:i+d/2}))),e.createElement("circle",l({},p,{r:i,fill:r,stroke:n,strokeWidth:d,mask:u>Math.floor(a/2)?"url('#layer-".concat(s,"-bottom-particle')"):void 0})))}));return e.createElement("g",null,e.createElement("animateTransform",{attributeName:"transform",begin:"0s",dur:"".concat(u,"s"),type:"rotate",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"}),f)};const f=function(t){var r=t.particlesPerLayer%2==0?Math.PI/2/Math.max(1,t.layerCount-1):Math.PI/Math.max(1,t.layerCount-1);return e.createElement(e.Fragment,null,Array.from({length:t.layerCount}).map((function(n,o){var a=o*r;return e.createElement(s,l({key:"nucleus-layer-".concat(a)},t,{particlesPerLayer:t.particlesPerLayer,startingAngle:a}))})))};var p=function(t){var r=t.atomSize,n=void 0===r?200:r,o=t.displayElectronPaths,i=void 0===o||o,c=t.displayNucleus,l=void 0===c||c,s=t.electronColorPalette,p=void 0===s?["#0081C9","#5BC0F8","#86E5FF"]:s,d=t.electronPathCount,y=void 0===d?3:d,m=t.electronPathColor,h=void 0===m?"#707070":m,v=t.electronPathWidth,b=void 0===v?.5:v,g=t.electronsPerPath,_=void 0===g?2:g,P=t.electronSize,E=void 0===P?1.5:P,S=t.electronSpeed,C=void 0===S?.5:S,w=t.nucleusLayerCount,k=void 0===w?2:w,O=t.nucleusParticlesPerLayer,x=void 0===O?3:O,R=t.nucleusParticleFillColor,j=void 0===R?"#707070":R,A=t.nucleusParticleBorderColor,T=void 0===A?"#999":A,M=t.nucleusParticleBorderWidth,$=void 0===M?.3:M,I=t.nucleusParticleSize,F=void 0===I?2.5:I,L=t.nucleusDistanceFromCenter,D=void 0===L?2.5:L,B=t.nucleusSpeed,z=void 0===B?.5:B,W=Array.from({length:y}).map((function(e,t){return{rotationAngle:0+t*(180/y),electronCount:_,electronOrbitTime:1/C+Math.random()*(.2/C)}})),N="electronPath",U="electron";return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:n,height:n,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},e.createElement("defs",null,e.createElement("path",{id:N,d:"M50 15A15 35 0 0 1 50 85A15 35 0 0 1 50 15",fill:"none"}),e.createElement("path",{id:U,d:"M0 0A15 35 0 0 1 0 70A15 35 0 0 1 0 0",fill:"none"})),l&&e.createElement(f,{layerCount:k,particlesPerLayer:x,particleSize:F,distanceFromCenter:D,particleFillColor:j,particleBorderColor:T,particleBorderWidth:$,orbitTime:10/z}),i&&W.map((function(t){var r=t.rotationAngle;return e.createElement(a,{key:"electron-path-".concat(r),pathDefinitionId:N,color:h,width:b,rotationAngle:r})})),W.map((function(t){var r=t.electronCount,n=t.rotationAngle,o=t.electronOrbitTime,a=(-1*Math.random()-1)*o;return Array.from({length:r}).map((function(t,i){var c=i;return e.createElement(u,{key:"electron-".concat(c),pathDefinitionId:U,rotationAngle:n,orbitTime:o,size:E,spacetimeOffset:a+i*(o/r),colorPalette:p})}))})))};p.propTypes={atomSize:o().number,displayElectronPaths:o().bool,displayNucleus:o().bool,electronColorPalette:o().arrayOf(o().string.isRequired),electronPathCount:o().number,electronPathColor:o().string,electronPathWidth:o().number,electronsPerPath:o().number,electronSize:o().number,electronSpeed:o().number,nucleusLayerCount:o().number,nucleusParticlesPerLayer:o().number,nucleusParticleFillColor:o().string,nucleusParticleBorderColor:o().string,nucleusParticleSize:o().number,nucleusDistanceFromCenter:o().number,nucleusParticleBorderWidth:o().number,nucleusSpeed:o().number};const d=p,y=e.memo(d)})(),n})())); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("atomic-spinner",[],t):"object"==typeof exports?exports["atomic-spinner"]=t():e["atomic-spinner"]=t()}(self,(()=>(()=>{var e={49:(e,t,r)=>{"use strict";var n=r(444);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,u){if(u!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},507:(e,t,r)=>{e.exports=r(49)()},444:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},257:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator,y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,h={};function b(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||y}function _(){}function v(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||y}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=b.prototype;var P=v.prototype=new _;P.constructor=v,m(P,b.prototype),P.isPureReactComponent=!0;var g=Array.isArray,E=Object.prototype.hasOwnProperty,C={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,n){var o,a={},u=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(u=""+t.key),t)E.call(t,o)&&!S.hasOwnProperty(o)&&(a[o]=t[o]);var i=arguments.length-2;if(1===i)a.children=n;else if(1<i){for(var c=Array(i),s=0;s<i;s++)c[s]=arguments[s+2];a.children=c}if(e&&e.defaultProps)for(o in i=e.defaultProps)void 0===a[o]&&(a[o]=i[o]);return{$$typeof:r,type:e,key:u,ref:l,props:a,_owner:C.current}}function k(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var $=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(e,t,o,a,u){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var i=!1;if(null===e)i=!0;else switch(l){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case r:case n:i=!0}}if(i)return u=u(i=e),e=""===a?"."+O(i,0):a,g(u)?(o="",null!=e&&(o=e.replace($,"$&/")+"/"),x(u,t,o,"",(function(e){return e}))):null!=u&&(k(u)&&(u=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(u,o+(!u.key||i&&i.key===u.key?"":(""+u.key).replace($,"$&/")+"/")+e)),t.push(u)),1;if(i=0,a=""===a?".":a+":",g(e))for(var c=0;c<e.length;c++){var s=a+O(l=e[c],c);i+=x(l,t,o,s,u)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),c=0;!(l=e.next()).done;)i+=x(l=l.value,t,o,s=a+O(l,c++),u);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function j(e,t,r){if(null==e)return e;var n=[],o=0;return x(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A={current:null},M={transition:null},T={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:M,ReactCurrentOwner:C};t.Children={map:j,forEach:function(e,t,r){j(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=b,t.Fragment=o,t.Profiler=u,t.PureComponent=v,t.StrictMode=a,t.Suspense=s,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),a=e.key,u=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,l=C.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(c in t)E.call(t,c)&&!S.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==i?i[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){i=Array(c);for(var s=0;s<c;s++)i[s]=arguments[s+2];o.children=i}return{$$typeof:r,type:e.type,key:a,ref:u,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=w,t.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=k,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=M.transition;M.transition={};try{e()}finally{M.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return A.current.useCallback(e,t)},t.useContext=function(e){return A.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return A.current.useDeferredValue(e)},t.useEffect=function(e,t){return A.current.useEffect(e,t)},t.useId=function(){return A.current.useId()},t.useImperativeHandle=function(e,t,r){return A.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return A.current.useMemo(e,t)},t.useReducer=function(e,t,r){return A.current.useReducer(e,t,r)},t.useRef=function(e){return A.current.useRef(e)},t.useState=function(e){return A.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return A.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return A.current.useTransition()},t.version="18.2.0"},959:(e,t,r)=>{"use strict";e.exports=r(257)},931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(959),o=r(507),a=r(964),u=r(601),l=r(506),i=({atomSize:e=200,displayElectronPaths:t=!0,displayNucleus:r=!0,electronColorPalette:o=["#0081C9","#5BC0F8","#86E5FF"],electronPathCount:i=3,electronPathColor:c="#707070",electronPathWidth:s=.5,electronsPerPath:f=2,electronSize:p=1.5,electronSpeed:d=.5,nucleusLayerCount:y=2,nucleusParticlesPerLayer:m=3,nucleusParticleFillColor:h="#707070",nucleusParticleBorderColor:b="#999",nucleusParticleBorderWidth:_=.3,nucleusParticleSize:v=2.5,nucleusDistanceFromCenter:P=2.5,nucleusSpeed:g=.5})=>{const E=Array.from({length:i}).map(((e,t)=>({rotationAngle:0+t*(180/i),electronCount:f,electronOrbitTime:1/d+Math.random()*(.2/d)}))),C="electronPath",S="electron";return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},n.createElement("defs",null,n.createElement("path",{id:C,d:"M50 15A15 35 0 0 1 50 85A15 35 0 0 1 50 15",fill:"none"}),n.createElement("path",{id:S,d:"M0 0A15 35 0 0 1 0 70A15 35 0 0 1 0 0",fill:"none"})),r&&n.createElement(l.default,{layerCount:y,particlesPerLayer:m,particleSize:v,distanceFromCenter:P,particleFillColor:h,particleBorderColor:b,particleBorderWidth:_,orbitTime:10/g}),t&&E.map((({rotationAngle:e})=>n.createElement(a.default,{key:`electron-path-${e}`,pathDefinitionId:C,color:c,width:s,rotationAngle:e}))),E.map((({electronCount:e,rotationAngle:t,electronOrbitTime:r})=>{const a=(-1*Math.random()-1)*r;return Array.from({length:e}).map(((l,i)=>{const c=i;return n.createElement(u.default,{key:`electron-${c}`,pathDefinitionId:S,rotationAngle:t,orbitTime:r,size:p,spacetimeOffset:a+i*(r/e),colorPalette:o})}))})))};i.propTypes={atomSize:o.default.number,displayElectronPaths:o.default.bool,displayNucleus:o.default.bool,electronColorPalette:o.default.arrayOf(o.default.string.isRequired),electronPathCount:o.default.number,electronPathColor:o.default.string,electronPathWidth:o.default.number,electronsPerPath:o.default.number,electronSize:o.default.number,electronSpeed:o.default.number,nucleusLayerCount:o.default.number,nucleusParticlesPerLayer:o.default.number,nucleusParticleFillColor:o.default.string,nucleusParticleBorderColor:o.default.string,nucleusParticleSize:o.default.number,nucleusDistanceFromCenter:o.default.number,nucleusParticleBorderWidth:o.default.number,nucleusSpeed:o.default.number},t.default=i},601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(959);let o=[];t.default=({pathDefinitionId:e,rotationAngle:t,orbitTime:r,spacetimeOffset:a,size:u,colorPalette:l})=>n.createElement("g",{"data-testid":"electron",transform:`rotate(${t} 50 50)`},n.createElement("circle",{cx:"50",cy:"15",r:u,fill:(o.length||(o=[...l]),o.pop())},n.createElement("animateMotion",{dur:`${r}s`,repeatCount:"indefinite",begin:`${a}s`},n.createElement("mpath",{href:`#${e}`}))))},964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(959);t.default=({pathDefinitionId:e,color:t,width:r,rotationAngle:o})=>n.createElement("g",{transform:`rotate(${o} 50 50)`},n.createElement("use",{href:`#${e}`,stroke:t,strokeWidth:r}))},506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(959),o=({particleFillColor:e,particleBorderColor:t,particleBorderWidth:r,particlesPerLayer:o,particleSize:a,distanceFromCenter:u,orbitTime:l,startingAngle:i})=>{const c=Array.from({length:o}).map(((l,c)=>{const s=i+c*(2*Math.PI/o),f={cx:50+(o>1?u*Math.cos(s):0),cy:50+(o>1?u*Math.sin(s):0)},p=Math.min(r,a/3);return n.createElement(n.Fragment,{key:`particle-${s}`},p>0&&0===c&&n.createElement("mask",{id:`layer-${i}-bottom-particle`},n.createElement("rect",{x:"0",y:"0",width:"100",height:"100",fill:"white"}),n.createElement("circle",Object.assign({},f,{r:a+p/2}))),n.createElement("circle",Object.assign({},f,{r:a,fill:e,stroke:t,strokeWidth:p,mask:c>Math.floor(o/2)?`url('#layer-${i}-bottom-particle')`:void 0})))}));return n.createElement("g",null,n.createElement("animateTransform",{attributeName:"transform",begin:"0s",dur:`${l}s`,type:"rotate",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"}),c)};t.default=e=>{const t=e.particlesPerLayer%2==0?Math.PI/2/Math.max(1,e.layerCount-1):Math.PI/Math.max(1,e.layerCount-1);return n.createElement(n.Fragment,null,Array.from({length:e.layerCount}).map(((r,a)=>{const u=a*t;return n.createElement(o,Object.assign({key:`nucleus-layer-${u}`},e,{particlesPerLayer:e.particlesPerLayer,startingAngle:u}))})))}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}var n={};return(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0});const t=r(959),o=r(931);e.default=t.default.memo(o.default)})(),n})())); |
{ | ||
"name": "atomic-spinner", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "Customizable React loading spinner that looks like an atom", | ||
@@ -5,0 +5,0 @@ "author": "David Lounsbrough", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24259
16
57