@zerodevx/svelte-img
Advanced tools
Comparing version 1.2.10 to 1.2.11
@@ -21,3 +21,6 @@ // @ts-nocheck | ||
return imagetools({ | ||
defaultDirectives: () => new URLSearchParams('width=480;1024;1920&format=avif;webp;jpg'), | ||
defaultDirectives: (url) => | ||
url.searchParams.has('run') | ||
? new URLSearchParams('width=480;1024;1920&format=avif;webp;jpg') | ||
: new URLSearchParams(''), | ||
extendTransforms: (builtins) => [...builtins, lqip], | ||
@@ -24,0 +27,0 @@ extendOutputFormats: (builtinOutputFormats) => ({ |
{ | ||
"name": "@zerodevx/svelte-img", | ||
"version": "1.2.10", | ||
"version": "1.2.11", | ||
"description": "High-performance responsive images for SvelteKit", | ||
@@ -13,5 +13,5 @@ "author": "Jason Lee <jason@zerodevx.com>", | ||
"format": "prettier --write --plugin-search-dir=. .", | ||
"lint": "prettier --check --plugin-search-dir=. . && eslint .", | ||
"lint": "prettier --check --plugin-search-dir=. . && eslint . && npm run check", | ||
"test": "playwright test", | ||
"package": "svelte-kit sync && svelte-package && npx publint", | ||
"package": "npm run lint && svelte-package && npx publint", | ||
"deploy": "npm run build && npx gh-pages -d build -t -f" | ||
@@ -24,3 +24,3 @@ }, | ||
"peerDependencies": { | ||
"svelte": "^3.55.1" | ||
"svelte": "^3.55.1 || ^4.0.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "devDependencies": { |
@@ -42,6 +42,6 @@ # svelte-img | ||
```js | ||
// Squelch warnings of all imports from your image assets dir | ||
// Squelch warnings of image imports from your assets dir | ||
declare module '$lib/assets/*' { | ||
const image: Record<string, any>[] | ||
export default image | ||
const meta: Object[] | ||
export default meta | ||
} | ||
@@ -215,3 +215,3 @@ ``` | ||
<Img {src} alt="hello" /> | ||
<Img {src} alt="cat" /> | ||
``` | ||
@@ -238,6 +238,6 @@ | ||
<Img {src} alt="cat" /> | ||
<Img class="better-blur" {src} alt="cat" /> | ||
<style> | ||
:global(img)::after { | ||
:global(img.better-blur)::after { | ||
content: ''; | ||
@@ -244,0 +244,0 @@ position: absolute; |
21846
184