@svelte-put/avatar
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -23,3 +23,3 @@ import { SvelteComponentTyped } from "svelte"; | ||
/** | ||
* Svelte `<img>` wrapper component for displaying avatar | ||
* Svelte image wrapper component for displaying avatar | ||
* @public | ||
@@ -26,0 +26,0 @@ */ |
@@ -13,2 +13,4 @@ /** | ||
size: number; | ||
/** All the images source from prop */ | ||
sources: string[]; | ||
}; | ||
@@ -15,0 +17,0 @@ } |
@@ -11,2 +11,2 @@ import type { AvatarProps } from './avatar.types'; | ||
export declare const DEFINITIVE_FALLBACK = "https://www.gravatar.com/avatar?d=mp"; | ||
export declare function resolveSrc(src: string, gravatar: AvatarProps['gravatar'], uiAvatar: AvatarProps['uiAvatar'], fallback: string): string[]; | ||
export declare function resolveSrc(src?: string, gravatar?: AvatarProps['gravatar'], uiAvatar?: AvatarProps['uiAvatar'], fallback?: string): string[]; |
@@ -59,5 +59,4 @@ import { gravatar as constructGravatarUrl, uiAvatar as constructUIAvatarUrl, } from './avatar.helpers'; | ||
let rGravatar = null; | ||
const rFallback = fallback === DEFINITIVE_FALLBACK ? null : fallback; | ||
if (gravatar) { | ||
if (rUIAvatar || rFallback) { | ||
if (rUIAvatar || fallback) { | ||
if (typeof gravatar === 'object' && !gravatar.default) { | ||
@@ -75,3 +74,3 @@ gravatar.default = '404'; | ||
} | ||
return [src, rGravatar, rUIAvatar, rFallback].filter(nonNullableFilter); | ||
return [src, rGravatar, rUIAvatar, fallback].filter(nonNullableFilter); | ||
} |
{ | ||
"name": "@svelte-put/avatar", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Component and utils for handling avatar", | ||
@@ -53,8 +53,8 @@ "type": "module", | ||
"devDependencies": { | ||
"@microsoft/api-documenter": "^7.19.23", | ||
"@microsoft/api-extractor": "^7.33.5", | ||
"@microsoft/api-documenter": "^7.19.24", | ||
"@microsoft/api-extractor": "^7.33.6", | ||
"@svelte-put/apirc": "^0.0.0", | ||
"@svelte-put/tsconfig": "^0.0.0", | ||
"@sveltejs/adapter-auto": "1.0.0-next.86", | ||
"@sveltejs/kit": "1.0.0-next.532", | ||
"@sveltejs/adapter-auto": "1.0.0-next.87", | ||
"@sveltejs/kit": "1.0.0-next.539", | ||
"@sveltejs/package": "1.0.0-next.5", | ||
@@ -69,3 +69,3 @@ "@types/md5": "^2.3.2", | ||
"typescript": "^4.8.4", | ||
"vite": "^3.2.2" | ||
"vite": "^3.2.3" | ||
}, | ||
@@ -72,0 +72,0 @@ "peerDependencies": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
23692
306
0