@grasco/profile-picture 0.2.5 → 0.2.6
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/dist/angular.cjs +1 -1
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.js +1 -1
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/standalone.standalone.js +1 -1
- package/dist/standalone.standalone.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/svelte.cjs +1 -1
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.js +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +1 -1
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
package/dist/angular.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var lit=require('lit'),decorators_js=require('lit/decorators.js'),styleMap_js=require('lit/directives/style-map.js');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;var ke=Object.defineProperty;var s=(r,o,e,t)=>{for(var n=void 0,i=r.length-1,l;i>=0;i--)(l=r[i])&&(n=(l(o,e,n))||n);return n&&ke(o,e,n),n};var H="grasco-profile-picture-styles",T=false,X=false;function Z(){if(T||typeof document>"u")return;if(document.getElementById(H)){T=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){T=true;return}X||(X=true,$e());}function $e(){(typeof requestIdleCallback<"u"?requestIdleCallback:o=>setTimeout(o,1))(()=>Ie());}function Ie(){if(T||typeof document>"u")return;if(document.getElementById(H)){T=true;return}let r=ze();if(!r)return;let o=document.createElement("link");o.id=H,o.rel="stylesheet",o.href=r,document.head.appendChild(o),T=true;}function ze(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let o=(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('angular.cjs', document.baseURI).href));if(o)return `${o.substring(0,o.lastIndexOf("/")+1)}styles.css`}catch{}let r=document.currentScript;if(r?.src){let o=new URL(r.src);return `${o.href.substring(0,o.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var D={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},Q={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},_={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},v={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm",zoom:1.2};var A={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},S={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function $(...r){return r.filter(Boolean).join(" ")}function te(r){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(r)}function P(r){let e=r.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,1).toUpperCase():(e[0][0]+(e.at(-1)?.[0]??"")).toUpperCase()}function W(r){return Math.round(r*.38)}function re(r,o){let e;if(o){let n=Math.round(r*.31);e=Math.min(24,Math.max(14,n));}else {let n=Math.round(r*.22);e=Math.min(14,Math.max(8,n));}let t=Math.max(9,Math.round(e*.55));return {size:e,fontSize:t}}function ne(r,o){let e=Math.min(16,Math.max(8,Math.round(r*.2)));return Math.min(18,e+(o-1)*2)}function oe(r,o){return typeof r=="string"?r:o&&r>o?`${o}+`:r.toString()}function ie(r){return r.length===0?"transparent":r.length===1?r[0]:`conic-gradient(${r.map((e,t)=>{let n=t/r.length*360,i=(t+1)/r.length*360;return `${e} ${n}deg ${i}deg`}).join(", ")})`}function B(r){let o=0;for(let e=0;e<r.length;e++){let t=r.charCodeAt(e);o=(o<<5)-o+t,o&=o;}return Math.abs(o)}function ae(r,o,e){let n=Math.max(0,Math.min(100,r))/100*360;return `conic-gradient(from 270deg, ${o} 0deg ${n}deg, ${e} ${n}deg 360deg)`}function O(r){let o=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],e=B(r)%o.length;return o[e]}var ee=[["#f4a261","#e76f51","#d4a5a5"],["#f2a9b0","#e07a5f","#d4c4a8"],["#c9b1d0","#e8a0bf","#f0d1ce"],["#89c2d9","#a3c4bc","#d5c6e0"],["#f7c59f","#f2a07b","#efcfe3"],["#b5a7d5","#d4a5c9","#f0c3d7"],["#7ec8c8","#6a9fb5","#c2b5d6"],["#f0b3ba","#d4a5c9","#c9d1d9"],["#e8b960","#d4956a","#c9a5b8"],["#a7c4a0","#c9d4a5","#e0c9b1"],["#c4819b","#d9a5b8","#b5aed4"],["#f0c27f","#e0a87c","#d4b5c9"]];function V(r,o,e){let t=p=>[Number.parseInt(p.slice(1,3),16),Number.parseInt(p.slice(3,5),16),Number.parseInt(p.slice(5,7),16)],n=t(r),i=t(o),l=p=>Math.round(n[p]+(i[p]-n[p])*e).toString(16).padStart(2,"0");return `#${l(0)}${l(1)}${l(2)}`}function se(r){let o=B(r),e=ee[o%ee.length],t="#f5f0eb",n=V(e[0],t,.85),i=V(e[1],t,.85),l=V(e[2],t,.85),p=B(r+"pos1"),d=B(r+"pos2"),c=20+o%61,u=20+(o>>4)%61,b=20+p%61,z=20+(p>>4)%61,E=20+d%61,w=20+(d>>4)%61;return [`radial-gradient(circle at ${c}% ${u}%, ${e[0]} 0%, ${n} 70%)`,`radial-gradient(circle at ${b}% ${z}%, ${e[1]} 0%, ${i} 70%)`,`radial-gradient(circle at ${E}% ${w}%, ${e[2]} 0%, ${l} 70%)`].join(", ")}function pe(r){return typeof r=="number"?r:D[r]??D[S.size]}function q(r,o,e){let t=e?o-1:o;if(r<=t)return {visible:r,hidden:0,showCounter:false};let n=t-1,i=r-n;return {visible:n,hidden:i,showCounter:true}}function L(r,o,e,t,n){let i=n??o*(1-e);return r*i}function de(r,o,e){return e==="ltr"?o-r:r+1}function le(r,o,e,t){if(r===0)return 0;if(r===1)return o;let n=t??o*(1-e);return o+n*(r-1)}function ce(r){return r>99?"+99":`+${r}`}function ge(r){return r<=80?"120":r<=120?"240":r<=240?"480":("960")}function ue(r,o,e,t,n){let i=r.endsWith("/")?r.slice(0,-1):r,l=`${o}_${e}_${t}.webp`;return `${i}/
|
|
1
|
+
'use strict';var lit=require('lit'),decorators_js=require('lit/decorators.js'),styleMap_js=require('lit/directives/style-map.js');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;var ke=Object.defineProperty;var s=(r,o,e,t)=>{for(var n=void 0,i=r.length-1,l;i>=0;i--)(l=r[i])&&(n=(l(o,e,n))||n);return n&&ke(o,e,n),n};var H="grasco-profile-picture-styles",T=false,X=false;function Z(){if(T||typeof document>"u")return;if(document.getElementById(H)){T=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){T=true;return}X||(X=true,$e());}function $e(){(typeof requestIdleCallback<"u"?requestIdleCallback:o=>setTimeout(o,1))(()=>Ie());}function Ie(){if(T||typeof document>"u")return;if(document.getElementById(H)){T=true;return}let r=ze();if(!r)return;let o=document.createElement("link");o.id=H,o.rel="stylesheet",o.href=r,document.head.appendChild(o),T=true;}function ze(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let o=(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('angular.cjs', document.baseURI).href));if(o)return `${o.substring(0,o.lastIndexOf("/")+1)}styles.css`}catch{}let r=document.currentScript;if(r?.src){let o=new URL(r.src);return `${o.href.substring(0,o.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var D={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},Q={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},_={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},v={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm",zoom:1.2};var A={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},S={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function $(...r){return r.filter(Boolean).join(" ")}function te(r){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(r)}function P(r){let e=r.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,1).toUpperCase():(e[0][0]+(e.at(-1)?.[0]??"")).toUpperCase()}function W(r){return Math.round(r*.38)}function re(r,o){let e;if(o){let n=Math.round(r*.31);e=Math.min(24,Math.max(14,n));}else {let n=Math.round(r*.22);e=Math.min(14,Math.max(8,n));}let t=Math.max(9,Math.round(e*.55));return {size:e,fontSize:t}}function ne(r,o){let e=Math.min(16,Math.max(8,Math.round(r*.2)));return Math.min(18,e+(o-1)*2)}function oe(r,o){return typeof r=="string"?r:o&&r>o?`${o}+`:r.toString()}function ie(r){return r.length===0?"transparent":r.length===1?r[0]:`conic-gradient(${r.map((e,t)=>{let n=t/r.length*360,i=(t+1)/r.length*360;return `${e} ${n}deg ${i}deg`}).join(", ")})`}function B(r){let o=0;for(let e=0;e<r.length;e++){let t=r.charCodeAt(e);o=(o<<5)-o+t,o&=o;}return Math.abs(o)}function ae(r,o,e){let n=Math.max(0,Math.min(100,r))/100*360;return `conic-gradient(from 270deg, ${o} 0deg ${n}deg, ${e} ${n}deg 360deg)`}function O(r){let o=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],e=B(r)%o.length;return o[e]}var ee=[["#f4a261","#e76f51","#d4a5a5"],["#f2a9b0","#e07a5f","#d4c4a8"],["#c9b1d0","#e8a0bf","#f0d1ce"],["#89c2d9","#a3c4bc","#d5c6e0"],["#f7c59f","#f2a07b","#efcfe3"],["#b5a7d5","#d4a5c9","#f0c3d7"],["#7ec8c8","#6a9fb5","#c2b5d6"],["#f0b3ba","#d4a5c9","#c9d1d9"],["#e8b960","#d4956a","#c9a5b8"],["#a7c4a0","#c9d4a5","#e0c9b1"],["#c4819b","#d9a5b8","#b5aed4"],["#f0c27f","#e0a87c","#d4b5c9"]];function V(r,o,e){let t=p=>[Number.parseInt(p.slice(1,3),16),Number.parseInt(p.slice(3,5),16),Number.parseInt(p.slice(5,7),16)],n=t(r),i=t(o),l=p=>Math.round(n[p]+(i[p]-n[p])*e).toString(16).padStart(2,"0");return `#${l(0)}${l(1)}${l(2)}`}function se(r){let o=B(r),e=ee[o%ee.length],t="#f5f0eb",n=V(e[0],t,.85),i=V(e[1],t,.85),l=V(e[2],t,.85),p=B(r+"pos1"),d=B(r+"pos2"),c=20+o%61,u=20+(o>>4)%61,b=20+p%61,z=20+(p>>4)%61,E=20+d%61,w=20+(d>>4)%61;return [`radial-gradient(circle at ${c}% ${u}%, ${e[0]} 0%, ${n} 70%)`,`radial-gradient(circle at ${b}% ${z}%, ${e[1]} 0%, ${i} 70%)`,`radial-gradient(circle at ${E}% ${w}%, ${e[2]} 0%, ${l} 70%)`].join(", ")}function pe(r){return typeof r=="number"?r:D[r]??D[S.size]}function q(r,o,e){let t=e?o-1:o;if(r<=t)return {visible:r,hidden:0,showCounter:false};let n=t-1,i=r-n;return {visible:n,hidden:i,showCounter:true}}function L(r,o,e,t,n){let i=n??o*(1-e);return r*i}function de(r,o,e){return e==="ltr"?o-r:r+1}function le(r,o,e,t){if(r===0)return 0;if(r===1)return o;let n=t??o*(1-e);return o+n*(r-1)}function ce(r){return r>99?"+99":`+${r}`}function ge(r){return r<=80?"120":r<=120?"240":r<=240?"480":("960")}function ue(r,o,e,t,n){let i=r.endsWith("/")?r.slice(0,-1):r,l=`${o}_${e}_${t}.webp`;return `${i}/profile-picture/cdn/${l}?hostname=${n}`}function fe(r){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[r]}function be(r,o){return {className:{1:"np:border",2:"np:border-2",3:"np:border-[3px]",4:"np:border-4",5:"np:border-[5px]",6:"np:border-[6px]",8:"np:border-8"}[r],style:{borderColor:o,borderStyle:"solid"}}}function me(r,o){return o?{className:"",style:{background:o}}:r?r.includes("gradient")?{className:"",style:{background:r}}:{className:"",style:{backgroundColor:r}}:{className:"",style:{backgroundColor:"transparent"}}}function he(r){return {boxShadow:_[r]}}var Me={shimmer:`
|
|
2
2
|
@keyframes pp-shimmer {
|
|
3
3
|
0% { transform: translateX(-100%); }
|
|
4
4
|
100% { transform: translateX(100%); }
|