Added: spin.js v3.1.0, v4.1.0

This commit is contained in:
nobody 2020-11-14 09:45:53 +01:00
parent c8a1965d34
commit b4daf8a2fb
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
4 changed files with 7 additions and 0 deletions

View File

@ -378,6 +378,10 @@ targets.setLastVersion = function (type, version) {
return '3.0.1'; return '3.0.1';
} else if (type.startsWith('/spin.js/2.')) { } else if (type.startsWith('/spin.js/2.')) {
return '2.3.2'; return '2.3.2';
} else if (type.startsWith('/spin.js/3.')) {
return '3.1.0';
} else if (type.startsWith('/spin.js/4.')) {
return '4.1.0';
} else if (type.startsWith('/stickyfill/1.')) { } else if (type.startsWith('/stickyfill/1.')) {
return '1.1.4'; return '1.1.4';
} else if (type.startsWith('/stickyfill/2.')) { } else if (type.startsWith('/stickyfill/2.')) {

View File

@ -78,6 +78,7 @@
<li>Added: React v17.0.1</li> <li>Added: React v17.0.1</li>
<li>Updated: Rickshaw v1.6.6 -> v1.7.1</li> <li>Updated: Rickshaw v1.6.6 -> v1.7.1</li>
<li>Added: Socket.IO v3.0.1</li> <li>Added: Socket.IO v3.0.1</li>
<li>Added: spin.js v3.1.0, v4.1.0</li>
</ul> </ul>
<div id="generator-section"> <div id="generator-section">
<div class="topic-label"> <div class="topic-label">

View File

@ -0,0 +1 @@
var __assign=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},defaults={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"none",position:"absolute"},Spinner=function(){function t(t){void 0===t&&(t={}),this.opts=__assign({},defaults,t)}return t.prototype.spin=function(t){var e,n,i,o=this;this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),css(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),"undefined"!=typeof requestAnimationFrame?(e=requestAnimationFrame,n=function(){return performance.now()}):(e=function(t){return setTimeout(t,1e3/o.opts.fps)},n=function(){return Date.now()});var r=0,s=function(){var t=n();if(void 0===i&&(i=t-1),r+=getAdvancePercentage(t-i,o.opts.speed),i=t,r>1&&(r-=Math.floor(r)),o.el.childNodes.length===o.opts.lines)for(var a=0;a<o.opts.lines;a++){var d=getLineOpacity(a,r,o.opts);o.el.childNodes[a].childNodes[0].style.opacity=d.toString()}o.animateId=o.el?e(s):void 0};return drawLines(this.el,this.opts),s(),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();export{Spinner};function getAdvancePercentage(t,e){return t/1e3*e}function getLineOpacity(t,e,n){var i=e-(t+1)/n.lines*n.direction;(i<0||i>1)&&(i+=n.direction);var o=1-i/(n.trail/100);return o<0?n.opacity:o*(1-n.opacity)+n.opacity}function vendor(t,e){if(void 0!==t.style[e])return e;var n="ms"+e.charAt(0).toUpperCase()+e.slice(1);return void 0!==t.style[n]?n:""}function css(t,e){for(var n in e)t.style[vendor(t,n)||n]=e[n];return t}function getColor(t,e){return"string"==typeof t?t:t[e%t.length]}function drawLines(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",i="none";!0===e.shadow?i="0 2px 4px #000":"string"==typeof e.shadow&&(i=e.shadow);for(var o=parseBoxShadow(i),r=0;r<e.lines;r++){var s=~~(360/e.lines*r+e.rotate),a=css(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:getColor(e.fadeColor,r),borderRadius:n,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),d=css(document.createElement("div"),{width:"100%",height:"100%",background:getColor(e.color,r),borderRadius:n,boxShadow:normalizeShadow(o,s),opacity:e.opacity});a.appendChild(d),t.appendChild(a)}}function parseBoxShadow(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],i=0,o=t.split(",");i<o.length;i++){var r=o[i].match(e);if(null!==r){var s=+r[2],a=+r[5],d=r[4],l=r[7];0!==s||d||(d=l),0!==a||l||(l=d),d===l&&n.push({prefix:r[1]||"",x:s,y:a,xUnits:d,yUnits:l,end:r[8]})}}return n}function normalizeShadow(t,e){for(var n=[],i=0,o=t;i<o.length;i++){var r=o[i],s=convertOffset(r.x,r.y,e);n.push(r.prefix+s[0]+r.xUnits+" "+s[1]+r.yUnits+r.end)}return n.join(", ")}function convertOffset(t,e,n){var i=n*Math.PI/180,o=Math.sin(i),r=Math.cos(i);return[Math.round(1e3*(t*r+e*o))/1e3,Math.round(1e3*(-t*o+e*r))/1e3]}

View File

@ -0,0 +1 @@
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},defaults={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},Spinner=function(){function t(t){void 0===t&&(t={}),this.opts=__assign(__assign({},defaults),t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),css(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),drawLines(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();export{Spinner};function css(t,e){for(var n in e)t.style[n]=e[n];return t}function getColor(t,e){return"string"==typeof t?t:t[e%t.length]}function drawLines(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",i="none";!0===e.shadow?i="0 2px 4px #000":"string"==typeof e.shadow&&(i=e.shadow);for(var s=parseBoxShadow(i),o=0;o<e.lines;o++){var r=~~(360/e.lines*o+e.rotate),a=css(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:getColor(e.fadeColor,o),borderRadius:n,transformOrigin:"left",transform:"rotate("+r+"deg) translateX("+e.radius+"px)"}),d=o*e.direction/e.lines/e.speed;d-=1/e.speed;var h=css(document.createElement("div"),{width:"100%",height:"100%",background:getColor(e.color,o),borderRadius:n,boxShadow:normalizeShadow(s,r),animation:1/e.speed+"s linear "+d+"s infinite "+e.animation});a.appendChild(h),t.appendChild(a)}}function parseBoxShadow(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],i=0,s=t.split(",");i<s.length;i++){var o=s[i].match(e);if(null!==o){var r=+o[2],a=+o[5],d=o[4],h=o[7];0!==r||d||(d=h),0!==a||h||(h=d),d===h&&n.push({prefix:o[1]||"",x:r,y:a,xUnits:d,yUnits:h,end:o[8]})}}return n}function normalizeShadow(t,e){for(var n=[],i=0,s=t;i<s.length;i++){var o=s[i],r=convertOffset(o.x,o.y,e);n.push(o.prefix+r[0]+o.xUnits+" "+r[1]+o.yUnits+o.end)}return n.join(", ")}function convertOffset(t,e,n){var i=n*Math.PI/180,s=Math.sin(i),o=Math.cos(i);return[Math.round(1e3*(t*o+e*s))/1e3,Math.round(1e3*(-t*s+e*o))/1e3]}